CrownChu commented on code in PR #7933:
URL: https://github.com/apache/paimon/pull/7933#discussion_r3308266347
##########
paimon-core/src/main/java/org/apache/paimon/table/source/FullTextScanImpl.java:
##########
@@ -61,7 +61,17 @@ public Plan scan() {
if (globalIndex == null) {
return false;
}
- return textColumn.id() == globalIndex.indexFieldId();
+ if (textColumn.id() == globalIndex.indexFieldId()) {
+ return true;
+ }
+ if (globalIndex.extraFieldIds() != null) {
+ for (int id : globalIndex.extraFieldIds()) {
+ if (textColumn.id() == id) {
+ return true;
+ }
+ }
Review Comment:
Before creating the GlobalIndexer, inspect the first index file's
GlobalIndexMeta to determine the file's column layout:
- indexFieldId == -1 (multi-column): resolve all field IDs from
extraFieldIds(), create reader with factory.create(List<DataField>, options)
- Otherwise (single-column): use original factory.create(textColumn,
options)
This ensures the reader matches the format used when the index file was
built.
Affected file:
-
paimon-core/src/main/java/org/apache/paimon/table/source/FullTextReadImpl.java
--
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]