HyukjinKwon commented on a change in pull request #25379: [SPARK-28474][SQL] 
Hive 0.12 JDBC client can not handle binary type
URL: https://github.com/apache/spark/pull/25379#discussion_r311835530
 
 

 ##########
 File path: 
sql/hive-thriftserver/v1.2.1/src/main/java/org/apache/hive/service/cli/ColumnValue.java
 ##########
 @@ -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));
 
 Review comment:
   String roundtrip with system default encoding (say, UTF-8) could be broken. 
Can we add a test? If that works, then should be good to go.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to