CrownChu commented on code in PR #7933:
URL: https://github.com/apache/paimon/pull/7933#discussion_r3308130641
##########
paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/globalindex/GenericIndexTopoBuilderTest.java:
##########
@@ -475,7 +475,7 @@ void testAppendFilterOldFilesBeforeNewFiles() {
GenericIndexTopoBuilder.filterEntriesBefore(
entries,
GenericIndexTopoBuilder.findMinNonIndexableRowId(
Review Comment:
done
##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/globalindex/GenericIndexTopoBuilder.java:
##########
@@ -626,16 +648,35 @@ public void processElement(StreamRecord<ShardTask>
element) throws Exception {
}
// Only write rows within this shard's range
if (currentRowId >= task.shardRange.from) {
- Object fieldData =
indexFieldGetter.getFieldOrNull(row);
- if (fieldData == null) {
- LOG.info(
- "Null vector at rowId={}, stopping
shard [{}, {}].",
- currentRowId,
- task.shardRange.from,
- task.shardRange.to);
- break;
+ if (multiColumn) {
+ boolean hasNull = false;
+ for (InternalRow.FieldGetter getter :
indexFieldGetters) {
+ if (getter.getFieldOrNull(row) == null) {
+ hasNull = true;
+ break;
+ }
+ }
+ if (hasNull) {
+ LOG.info(
+ "Null value in indexed columns at
rowId={}, stopping shard [{}, {}].",
+ currentRowId,
+ task.shardRange.from,
+ task.shardRange.to);
+ break;
+ }
+ ((GlobalIndexMultiColumnWriter)
indexWriter).write(row);
+ } else {
+ Object fieldData =
indexFieldGetters[0].getFieldOrNull(row);
+ if (fieldData == null) {
+ LOG.info(
Review Comment:
fixed
--
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]