-
Notifications
You must be signed in to change notification settings - Fork 551
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
Support "with" identifiers surrounded by backticks in GenericDialect
#1010
Support "with" identifiers surrounded by backticks in GenericDialect
#1010
Conversation
Pull Request Test Coverage Report for Build 6577799521
💛 - Coveralls |
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.
Thank you @bitemyapp -- I have just a small test request
@@ -32,6 +32,20 @@ fn parse_table_create() { | |||
hive().verified_stmt(iof); | |||
} | |||
|
|||
fn generic(options: Option<ParserOptions>) -> TestedDialects { | |||
TestedDialects { | |||
dialects: vec![Box::new(GenericDialect {})], |
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 you also please test HiveDialect
given this is in the sqlparser_hive.rs
module?
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.
Of course, good point. Thank you.
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.
I didn't find any test-cases that tested generic
and not hive
. Everything was either hive
alone or hive
and generic
, e.g. the parse_create_function
test. I'm not sure it makes sense to blend them given how they get used in the tests. I think it makes sense to test hive-isms that generic
should be able to handle in the module that tests hive-isms rather than duplicating everything into the generic test module.
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.
How about something like this in sqlparser_common.rs?
(maybe we can do this as a follow on PR)
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.
I don't mind doing a follow-up PR.
Perhaps I could do something like parse_deeply_nested_expr_hits_recursion_limits
in the common module but parameterized over the dialect, then invoke the helper in the generic & hive test modules? If that sounds acceptable let me know and I will pursue that.
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 I was suggesting was to remove generic()
and test parse_describe
with both hive and generic
in
GenericDialect`
in
GenericDialect`\
in
GenericDialect`
\
in
GenericDialect` in
GenericDialect`
in
GenericDialect` in
GenericDialect`
in
GenericDialect`GenericDialect
GenericDialect
GenericDialect
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 -- thank you @bitemyapp
@@ -32,6 +32,20 @@ fn parse_table_create() { | |||
hive().verified_stmt(iof); | |||
} | |||
|
|||
fn generic(options: Option<ParserOptions>) -> TestedDialects { | |||
TestedDialects { | |||
dialects: vec![Box::new(GenericDialect {})], |
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.
How about something like this in sqlparser_common.rs?
(maybe we can do this as a follow on PR)
I'm reviving this patch from #652
Please let me know what I'd need to do to make this merge-able. I'd like to be able to stop operating a fork of
sqlparser-rs
for parsing our Hive/Athena SQL so any direction you can give is much appreciated.parse_describe
validates the behavior for the hive and generic dialects.