-
Notifications
You must be signed in to change notification settings - Fork 598
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
fix(frontend): refine error messages for invalid operations #6548
Conversation
Co-authored-by: clundro <clusternlh@gmail.com>
table: TableWithJoins, | ||
table_name: ObjectName, |
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.
Update joins is mysql's syntax
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.
Update is very hard. 🤣
@@ -136,53 +136,6 @@ fn parse_update() { | |||
); | |||
} | |||
|
|||
#[test] | |||
fn parse_update_with_table_alias() { | |||
let sql = "UPDATE users AS u SET u.username = 'new_user' WHERE u.username = 'old_user'"; |
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.
pg support this (and also DELETE .. AS ..
, which is not supported by parser now), but maybe let's do it later.
Codecov Report
@@ Coverage Diff @@
## main #6548 +/- ##
==========================================
- Coverage 74.07% 73.99% -0.08%
==========================================
Files 989 993 +4
Lines 161850 162086 +236
==========================================
+ Hits 119888 119941 +53
- Misses 41962 42145 +183
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
LGTM
table: TableWithJoins, | ||
table_name: ObjectName, |
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.
Update is very hard. 🤣
@@ -0,0 +1,394 @@ | |||
# 1. drop non-existent relation | |||
|
|||
statement error table not found |
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.
Can we maintain these error messages without pain? 🥵
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.
What is the pain you mean?
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.
Do we have to manually update all these error messages if we change them in the future?
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.
Yes, but since it’s regexp match instead of full match, and it won’t be frequently changed, I think it won’t be a huge pain 🫣
I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.
What's changed and what's your intention?
close #3258 (replace)
Checklist
./risedev check
(or alias,./risedev c
)