Skip to content

minor: Add databricks dialect to dialect_from_str #1416

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

Merged
merged 3 commits into from
Sep 10, 2024

Conversation

milenkovicm
Copy link
Contributor

Databricks dialect is missing in dialect_from_str function

@coveralls
Copy link

coveralls commented Sep 8, 2024

Pull Request Test Coverage Report for Build 10799617540

Details

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 89.307%

Totals Coverage Status
Change from base Build 10799563174: 0.001%
Covered Lines: 29166
Relevant Lines: 32658

💛 - Coveralls

@Dandandan
Copy link
Contributor

Databricks dialect is missing in dialect_from_str function

Is there anything that you plan implementing for Databricks dialect? I think databricks mostly should be able to use ansidialect.

@milenkovicm
Copy link
Contributor Author

I'm not sure I'll be able to implement anything in short term, I've tried to use it from datafusion to realise it's not there.

the edge case I've found is CREATE TABLE USING https://docs.databricks.com/en/sql/language-manual/sql-ref-syntax-ddl-create-table-using.html

please ignore PR if it should not be expose

@milenkovicm milenkovicm changed the title minor: Add dabricks dialect to dialect_from_str minor: Add databricks dialect to dialect_from_str Sep 8, 2024
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

I think this is a reasonable change and improvement. Thank you @milenkovicm and @Dandandan

Maybe it would be great to add some tests to avoid new dialects being missed, but we could do that as a follow on PR

@milenkovicm
Copy link
Contributor Author

milenkovicm commented Sep 9, 2024

@alamb
Copy link
Contributor

alamb commented Sep 9, 2024

maybe generic approach should be taken like in https://github.com/apache/datafusion/blob/6e790cf1f363652c3f2ed64286da75a1d5e88cb9/datafusion-cli/src/helper.rs#L75

I generic approach that lists all the dialects programatically makes a lot of sense to me.

@alamb
Copy link
Contributor

alamb commented Sep 10, 2024

I merged this PR up from main and added a small test

@alamb alamb merged commit 8dbcbb3 into apache:main Sep 10, 2024
10 checks passed
ayman-sigma pushed a commit to sigmacomputing/sqlparser-rs that referenced this pull request Nov 19, 2024
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.

4 participants