jonvex commented on code in PR #13711:
URL: https://github.com/apache/hudi/pull/13711#discussion_r2281045062


##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/client/utils/SparkMetadataWriterUtils.java:
##########
@@ -206,6 +216,15 @@ public static ExpressionIndexComputationMetadata 
getExpressionIndexRecordsUsingC
         : new ExpressionIndexComputationMetadata(colStatRecords);
   }
 
+  private static Comparable convertSparkToJava(Object value, Schema 
columnSchema, DataType dataType, HoodieIndexVersion indexVersion) {
+    if (indexVersion.lowerThan(HoodieIndexVersion.V2)) {
+      return (Comparable) value;
+    }
+    //TODO: replace this with something faster
+    HoodieAvroDeserializer deserializer = 
SparkAdapterSupport$.MODULE$.sparkAdapter().createAvroDeserializer(columnSchema,
 dataType);
+    return (Comparable) deserializer.deserialize(value);

Review Comment:
   Should also maybe call standardizeJavaTypeAndPromote?



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to