Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,7 @@ class SparkThriftServerProtocolVersionsSuite extends HiveThriftJdbcTest {
}
}

// TODO: enable this test case after SPARK-28474
ignore(s"$version get binary type") {
test(s"$version get binary type") {
testExecuteStatementWithProtocolVersion(version, "SELECT cast('ABC' as binary)") { rs =>
assert(rs.next())
assert(rs.getString(1) === "ABC")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public static TColumnValue toTColumnValue(Type type, Object value) {
case DECIMAL_TYPE:
return stringValue(((HiveDecimal)value));
case BINARY_TYPE:
return stringValue((String)value);
return stringValue(new String((byte[])value));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We stored it as Array[Byte]:

case ARRAY_TYPE:
case MAP_TYPE:
case STRUCT_TYPE:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public static TColumnValue toTColumnValue(TypeDescriptor typeDescriptor, Object
case DECIMAL_TYPE:
return stringValue((HiveDecimal)value, typeDescriptor);
case BINARY_TYPE:
return stringValue((String)value);
return stringValue(new String((byte[])value));
case ARRAY_TYPE:
case MAP_TYPE:
case STRUCT_TYPE:
Expand Down