github-actions[bot] commented on code in PR #63637:
URL: https://github.com/apache/doris/pull/63637#discussion_r3300771866


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/RewriteSearchToSlots.java:
##########
@@ -127,6 +131,11 @@ private Expression rewriteSearch(Search search, 
LogicalOlapScan scan) {
                                 parentFieldName, search.getDslString()));
                     }
 
+                    // Check the parent variant column has at least one 
INVERTED index. The concrete
+                    // subcolumn binding is resolved per-segment in BE, so we 
only enforce the parent
+                    // level here. See function_search.cpp is_variant_sub 
branch.
+                    checkInvertedIndexExists(scan.getTable(), parentFieldName, 
search.getDslString(), true);
+

Review Comment:
   This passes the parent name exactly as written in the DSL, but 
`checkInvertedIndexExists` immediately calls `table.getColumn(columnName)`, and 
`Table.getColumn()` is case-sensitive. `findSlotByName(parentFieldName, scan)` 
above is case-insensitive, so a valid query such as `search('V.foo:bar')` on a 
table with variant column `v` and an inverted index on `v` now resolves the 
slot successfully and then fails with `Column 'V' not found`. The normal-column 
branch avoids this by passing `slot.getName()` after resolution; the variant 
branch should pass the resolved `parentSlot.getName()` (and ideally add a 
variant case-insensitivity test).



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to