You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "ChestnutQiang (via GitHub)" <gi...@apache.org> on 2023/04/13 06:59:05 UTC

[GitHub] [hudi] ChestnutQiang commented on a diff in pull request #8448: [HUDI-6069] Fixing If the primary key is a non-string type, and metas…

ChestnutQiang commented on code in PR #8448:
URL: https://github.com/apache/hudi/pull/8448#discussion_r1165086554


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/index/bloom/HoodieBloomIndex.java:
##########
@@ -234,8 +234,8 @@ protected List<Pair<String, BloomIndexFileInfo>> loadColumnRangesFromMetaIndex(
           new BloomIndexFileInfo(
               FSUtils.getFileId(entry.getKey().getRight()),
               // NOTE: Here we assume that the type of the primary key field is string
-              (String) unwrapStatisticValueWrapper(entry.getValue().getMinValue()),
-              (String) unwrapStatisticValueWrapper(entry.getValue().getMaxValue())
+              unwrapStatisticValueWrapper(entry.getValue().getMinValue()).toString(),
+              unwrapStatisticValueWrapper(entry.getValue().getMaxValue()).toString()

Review Comment:
   Thank you very much, I think if the primary key is null, an exception should be thrown inside this method. After I modified it like this, all other reads and writes were normal. Even if the primary key is bigint



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