tsreaper commented on code in PR #5537:
URL: https://github.com/apache/paimon/pull/5537#discussion_r2059867029
##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/lookup/PrimaryKeyPartialLookupTable.java:
##########
@@ -241,12 +264,14 @@ public void refresh() {
}
for (Split split : splits) {
- BinaryRow partition = ((DataSplit) split).partition();
- int bucket = ((DataSplit) split).bucket();
- List<DataFileMeta> before = ((DataSplit)
split).beforeFiles();
- List<DataFileMeta> after = ((DataSplit) split).dataFiles();
+ DataSplit dataSplit = (DataSplit) split;
+ BinaryRow partition = dataSplit.partition();
+ int bucket = dataSplit.bucket();
+ List<DataFileMeta> before = dataSplit.beforeFiles();
+ List<DataFileMeta> after = dataSplit.dataFiles();
tableQuery.refreshFiles(partition, bucket, before, after);
+ totalBuckets.put(partition, dataSplit.totalBuckets());
Review Comment:
`totalBuckets` might be empty because the table is created by older versions
of Paimon. In this case, use `bucket` from `table` instead. Make sure that
`bucket > 0`. Add a test case for this.
--
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]