You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2023/01/06 21:44:13 UTC

[GitHub] [hudi] alexeykudinkin commented on a diff in pull request #7573: [HUDI-5484] Avoid using `GenericRecord` in `HoodieColumnStatMetadata`

alexeykudinkin commented on code in PR #7573:
URL: https://github.com/apache/hudi/pull/7573#discussion_r1063822975


##########
hudi-common/src/test/java/org/apache/hudi/common/util/TestSerializationUtils.java:
##########
@@ -80,6 +86,30 @@ public void testClassFullyQualifiedNameSerialization() throws IOException {
     assertEquals(ByteBuffer.wrap(firstBytes), ByteBuffer.wrap(secondBytes));
   }
 
+  @Test
+  public void testSerHoodieMetadataPayload() throws IOException {

Review Comment:
   Let's move this test to hudi-spark module to make sure it's being run against every Spark version



##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieMetadataPayload.java:
##########
@@ -233,8 +233,8 @@ public HoodieMetadataPayload(Option<GenericRecord> recordOpt) {
           columnStatMetadata = HoodieMetadataColumnStats.newBuilder(METADATA_COLUMN_STATS_BUILDER_STUB.get())
               .setFileName((String) columnStatsRecord.get(COLUMN_STATS_FIELD_FILE_NAME))
               .setColumnName((String) columnStatsRecord.get(COLUMN_STATS_FIELD_COLUMN_NAME))
-              .setMinValue(columnStatsRecord.get(COLUMN_STATS_FIELD_MIN_VALUE))
-              .setMaxValue(columnStatsRecord.get(COLUMN_STATS_FIELD_MAX_VALUE))
+              .setMinValue(wrapStatisticValue(unwrapStatisticValueWrapper(columnStatsRecord.get(COLUMN_STATS_FIELD_MIN_VALUE))))

Review Comment:
   Let's add a comment explaining why we need to do that here



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org