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
[BugFix] Not ignore the leading space when parse delete predicate value #39797
Conversation
k1 is varchar key column, and delete from tbl where k1 = " a" success. the delete predicate will be parsed as k1 = "a" when quering, so the data is not really deleted. Signed-off-by: wyb <wybb86@gmail.com>
[FE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
// group1: ([^\0=<>!\*]{1,64}) matches "c1" | ||
// group2: ((?:=)|(?:!=)|(?:>>)|(?:<<)|(?:>=)|(?:<=)|(?:\*=)|(?:IS)) matches "=" | ||
// group3: ((?:[\s\S]+)?) matches "1597751948193618247 and length(source)<1;\n;\n" | ||
// group3: ((?:[\s\S]+)?) matches " 1597751948193618247 and length(source)<1;\n;\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out of curious, why use string to save sub conditions instead of a well defined structure, e.g. pb to save this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
historical reason, and pb is used in cloud native table.
@Mergifyio backport branch-3.2 |
@Mergifyio backport branch-3.1 |
@Mergifyio backport branch-3.0 |
✅ Backports have been created
|
@Mergifyio backport branch-2.5 |
✅ Backports have been created
|
✅ Backports have been created
|
✅ Backports have been created
|
…ue (StarRocks#39797) Signed-off-by: wyb <wybb86@gmail.com> Signed-off-by: Seaven <seaven_7@qq.com>
Why I'm doing:
k1 is varchar key column, and delete from tbl where k1 = " a" success.
the delete predicate will be parsed as k1 = "a" when quering, so the data is not really deleted.
What I'm doing:
parse the predicate value correctly.
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: