-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add parsing for common table expressions using WITH clause #8918
Conversation
Signed-off-by: ritwizsinha <ritwizsinha0@gmail.com>
Signed-off-by: ritwizsinha <ritwizsinha0@gmail.com>
Signed-off-by: ritwizsinha <ritwizsinha0@gmail.com>
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.
We should also fail gracefully in the planners when we encounter a with ast node
Signed-off-by: ritwizsinha <ritwizsinha0@gmail.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
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.
Looks good to me, left a couple of comments :)
Signed-off-by: ritwizsinha <ritwizsinha0@gmail.com>
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.
overall looks good. Just 1 comment.
switch node := selStatement.(type) { | ||
case *sqlparser.Select: | ||
if node.With != nil { | ||
return nil, vterrors.New(vtrpcpb.Code_UNIMPLEMENTED, "unsupported: with expression in select statement") | ||
} | ||
case *sqlparser.Union: | ||
if node.With != nil { | ||
return nil, vterrors.New(vtrpcpb.Code_UNIMPLEMENTED, "unsupported: with expression in union statement") | ||
} | ||
} |
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.
nit: add the function on the SelectStatement interface.
Description
Updated grammar and formatting to add support for common table expressions
Related Issue(s)
Checklist
Deployment Notes