Skip to content
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 support for Snowflake SHOW DATABASES/SCHEMAS/TABLES/VIEWS/COLUMNS statements #1501

Merged
merged 6 commits into from
Nov 13, 2024

Conversation

yoavcloud
Copy link
Contributor

This PR extends the existing support for SHOW statements to Snowflake

@yoavcloud yoavcloud force-pushed the snowflake_show branch 2 times, most recently from 991298d to 85901b5 Compare November 6, 2024 17:47
src/parser/mod.rs Outdated Show resolved Hide resolved
src/ast/mod.rs Show resolved Hide resolved
src/ast/mod.rs Outdated Show resolved Hide resolved
src/ast/mod.rs Outdated Show resolved Hide resolved
src/ast/mod.rs Outdated Show resolved Hide resolved
src/parser/mod.rs Outdated Show resolved Hide resolved
src/parser/mod.rs Outdated Show resolved Hide resolved
src/parser/mod.rs Outdated Show resolved Hide resolved
src/parser/mod.rs Outdated Show resolved Hide resolved
src/parser/mod.rs Outdated Show resolved Hide resolved
@yoavcloud
Copy link
Contributor Author

@iffyio thanks for the great comments, it really helped me improve this code. New commit for you to look at.

Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments, mostly small I think, the only one unclear to me was the mysql object_name insert behavior. I think this looks good overall, Thanks @yoavcloud!

src/ast/mod.rs Outdated Show resolved Hide resolved
src/parser/mod.rs Outdated Show resolved Hide resolved
src/parser/mod.rs Outdated Show resolved Hide resolved
src/parser/mod.rs Outdated Show resolved Hide resolved
src/parser/mod.rs Outdated Show resolved Hide resolved
src/parser/mod.rs Show resolved Hide resolved
tests/sqlparser_snowflake.rs Show resolved Hide resolved
src/ast/mod.rs Show resolved Hide resolved
@yoavcloud yoavcloud requested a review from iffyio November 11, 2024 13:50
@@ -606,6 +606,12 @@ pub trait Dialect: Debug + Any {
fn supports_top_before_distinct(&self) -> bool {
false
}

/// Returns true if this dialect support the `LIKE 'pattern'` option in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Returns true if this dialect support the `LIKE 'pattern'` option in
/// Returns true if this dialect supports the `LIKE 'pattern'` option in

src/parser/mod.rs Outdated Show resolved Hide resolved
src/parser/mod.rs Show resolved Hide resolved
tests/sqlparser_snowflake.rs Show resolved Hide resolved
src/ast/mod.rs Show resolved Hide resolved
@yoavcloud yoavcloud requested a review from iffyio November 12, 2024 19:41
Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! cc @alamb

@alamb
Copy link
Contributor

alamb commented Nov 13, 2024

🚀

@alamb alamb merged commit 76322ba into apache:main Nov 13, 2024
8 checks passed
@alamb
Copy link
Contributor

alamb commented Nov 13, 2024

Thanks again @iffyio and @yoavcloud

@alamb
Copy link
Contributor

alamb commented Nov 26, 2024

We think this may have introduced a small regression:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants