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

Support hive CREATE FUNCTION syntax #496

Merged
merged 1 commit into from May 26, 2022

Conversation

mobuchowski
Copy link
Contributor

@coveralls
Copy link

coveralls commented May 11, 2022

Pull Request Test Coverage Report for Build 2390143654

  • 52 of 65 (80.0%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.06%) to 89.611%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/ast/mod.rs 13 19 68.42%
src/parser.rs 17 24 70.83%
Files with Coverage Reduction New Missed Lines %
src/ast/mod.rs 1 78.04%
Totals Coverage Status
Change from base Build 2386872378: -0.06%
Covered Lines: 8470
Relevant Lines: 9452

💛 - Coveralls

Copy link
Collaborator

@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.

LGTM -- thank you @mobuchowski

What do you think about conditionalizing this on being part of the hive Dialect?

@mobuchowski
Copy link
Contributor Author

@alamb I think making this conditional would be a good solution. Looking at other DBs that support some form of CREATE FUNCTION like BigQuery or even MS SQL , the syntax is pretty much unique for each db.

@alamb
Copy link
Collaborator

alamb commented May 25, 2022

This PR appears to have a merge conflict now.

Also, @mobuchowski are you planning to implement #496 (comment) in this PR, or shall we file a ticket for a follow on task?

@mobuchowski
Copy link
Contributor Author

Sorry, had a busy week. I'll fix the conflict and implement the conditional tomorrow.

@alamb
Copy link
Collaborator

alamb commented May 25, 2022

Sorry, had a busy week. I'll fix the conflict and implement the conditional tomorrow.

I totally understand!

Signed-off-by: Maciej Obuchowski <obuchowski.maciej@gmail.com>
@mobuchowski
Copy link
Contributor Author

Hey @alamb, fixed the PR and added checking for HiveDialect.

Copy link
Collaborator

@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.

Looks great -- thank you @mobuchowski

};

assert_eq!(
generic.parse_sql_statements(sql).unwrap_err(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@alamb alamb changed the title hive: add create function syntax Support hive CREATE FUNCTION syntax May 26, 2022
@alamb alamb merged commit cc2559c into sqlparser-rs:main May 26, 2022
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.

None yet

3 participants