AshinGau commented on code in PR #10213:
URL: https://github.com/apache/doris/pull/10213#discussion_r901041856
##########
fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/DbPrivEntry.java:
##########
@@ -70,8 +70,7 @@ private static PatternMatcher createDbPatternMatcher(String
db) throws AnalysisE
dbCaseSensibility = false;
}
- PatternMatcher dbPattern =
PatternMatcher.createMysqlPattern(db.equals(ANY_DB) ? "%" : db,
dbCaseSensibility);
- return dbPattern;
+ return PatternMatcher.createFlatPattern(db, dbCaseSensibility,
db.equals(ANY_DB));
Review Comment:
done
##########
fe/fe-core/src/main/java/org/apache/doris/common/PatternMatcher.java:
##########
@@ -20,27 +20,58 @@
import com.google.common.base.Strings;
import com.google.common.collect.Sets;
+import java.util.Locale;
import java.util.Set;
import java.util.regex.Pattern;
// Wrap for Java pattern and matcher
public class PatternMatcher {
+ public static final PatternMatcher MATCH_ANY = new
PatternMatcher(Pattern.compile(".*"));
private Pattern pattern;
+ private String flatPattern;
Review Comment:
done
--
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]