the-other-tim-brown commented on code in PR #17772:
URL: https://github.com/apache/hudi/pull/17772#discussion_r2659084752


##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/common/model/HoodieSparkRecord.java:
##########
@@ -404,13 +401,13 @@ protected final InternalRow readRecordPayload(Kryo kryo, 
Input input) {
   }
 
   @Override
-  public Object convertColumnValueForLogicalType(Schema fieldSchema,
+  public Object convertColumnValueForLogicalType(HoodieSchema fieldSchema,
                                                  Object fieldValue,
                                                  boolean 
keepConsistentLogicalTimestamp) {
     if (fieldValue == null) {
       return null;
     }
-    LogicalType logicalType = fieldSchema.getLogicalType();
+    LogicalType logicalType = fieldSchema.toAvroSchema().getLogicalType();

Review Comment:
   Instead of using the avro logical type, let's just use the type of the 
HoodieSchema



##########
hudi-hadoop-common/src/test/java/org/apache/hudi/metadata/TestHoodieTableMetadataUtil.java:
##########
@@ -337,7 +335,7 @@ private static void writeParquetFile(String instant,
     for (HoodieRecord record : records) {
       writer.writeWithMetadata(record.getKey(),
               //TODO boundary to revisit in follow up to use HoodieSchema 
directly

Review Comment:
   let's remove this todo?



##########
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/HoodieHiveRecord.java:
##########
@@ -138,13 +137,13 @@ protected ArrayWritable readRecordPayload(Kryo kryo, 
Input input) {
   }
 
   @Override
-  public Object convertColumnValueForLogicalType(Schema fieldSchema,
+  public Object convertColumnValueForLogicalType(HoodieSchema fieldSchema,
                                                  Object fieldValue,
                                                  boolean 
keepConsistentLogicalTimestamp) {
     if (fieldValue == null) {
       return null;
     }
-    LogicalType logicalType = fieldSchema.getLogicalType();
+    LogicalType logicalType = fieldSchema.toAvroSchema().getLogicalType();

Review Comment:
   Similarly here, let's migrate to use the HoodieSchemaType



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