-
Notifications
You must be signed in to change notification settings - Fork 2k
[BugFix]Fix unclear error messages when an unsupported regex type is … #57904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
wuyanxing seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
I can't reproduce your case in main branch. And I can see the exact error message. Can you give some other examples? |
starrocks/fe/fe-core/src/main/java/com/starrocks/sql/analyzer/ExpressionAnalyzer.java Line 946 in e920935
the Exception is : PatternSyntaxException is java.util.regex.PatternSyntaxException,but Pattern is com.google.re2j.Pattern. |
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
I mean I can't reproduce your case in main branch.
could your test it with main branch? |
sry, I wrote the wrong SQL,try the one below instead. |
…used.
Why I'm doing:
select 'a' RLIKE '([A-Za-z0-9]+[\\u4e00-\\u9fa5]{2}[A-Za-z0-9]+)';
before:
ERROR 1064 (HY000): error parsing regexp: invalid escape sequence: \u
after fix:
ERROR 1064 (HY000): Getting analyzing error from line 1, column 11 to line 1, column 17. Detail message: Invalid regular expression in ''a' REGEXP '([A-Za-z0-9]+[\u4e00-\u9fa5]{2}[A-Za-z0-9]+)''.
What I'm doing:
Fixes #issue
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: