wangyum commented on a change in pull request #25217: 
[SPARK-28463][SQL][test-hadoop3.2] Thriftserver throws BigDecimal incompatible 
with HiveDecimal
URL: https://github.com/apache/spark/pull/25217#discussion_r305600807
 
 

 ##########
 File path: 
sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/ColumnBasedSet.java
 ##########
 @@ -105,12 +104,7 @@ public ColumnBasedSet addRow(Object[] fields) {
     } else {
       for (int i = 0; i < fields.length; i++) {
         TypeDescriptor descriptor = descriptors[i];
-        Object field = fields[i];
-        if (field != null && descriptor.getType() == Type.DECIMAL_TYPE) {
-          int scale = descriptor.getDecimalDigits();
-          field = ((HiveDecimal) field).toFormatString(scale);
-        }
-        columns.get(i).addValue(descriptor.getType(), field);
+        columns.get(i).addValue(descriptor.getType(), fields[i]);
       }
     }
     return this;
 
 Review comment:
   Hive 1.2.1: 
https://github.com/apache/spark/blob/02c33694c8254f69cb36c71c0876194dccdbc014/sql/hive-thriftserver/v1.2.1/src/main/java/org/apache/hive/service/cli/ColumnBasedSet.java#L62-L68

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to