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


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java:
##########
@@ -4116,11 +4115,12 @@ public Index getInvertedIndex(Column column, 
List<String> subPath, String analyz
                 String childName = child.getName();
                 if (child.getFieldPatternType() == 
PatternType.MATCH_NAME_GLOB) {
                     try {
-                        com.google.re2j.Pattern compiled = 
GlobRegexUtil.getOrCompilePattern(childName);
-                        if (compiled.matcher(subPathString).matches()) {
+                        java.nio.file.PathMatcher matcher = 
java.nio.file.FileSystems.getDefault()
+                                .getPathMatcher("glob:" + childName);

Review Comment:
   [P2] Reuse compiled field-pattern matchers across Variant index lookups. 
This compiles a new PathMatcher for every glob child on every getInvertedIndex 
call, after removing the 256-entry GlobRegexUtil cache. MATCH and SEARCH 
translation call this for each Variant subpath, so a query with many subpaths 
repeatedly compiles the same schema patterns during planning (and SEARCH can 
repeat a lookup after a null result). Retain a bounded matcher cache or 
precompile the patterns in table metadata, and cover a multi-subpath lookup.



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