Skip to content

Support table function derived table #253

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 1 commit into from
Aug 5, 2020

Conversation

eyalleshem
Copy link
Contributor

@eyalleshem eyalleshem commented Aug 2, 2020

Support TABLE(...) syntax in FROM, for example:

select * from TABLE(SOME_FUNCTION(some_arg))

The ANSI spec allows routine invocations (and some other kinds of expressions we don't currently support) inside TABLE:
https://jakewheat.github.io/sql-overview/sql-2016-foundation-grammar.html#PTF-derived-table
https://jakewheat.github.io/sql-overview/sql-2016-foundation-grammar.html#table-function-derived-table

@coveralls
Copy link

coveralls commented Aug 2, 2020

Pull Request Test Coverage Report for Build 194907691

  • 35 of 37 (94.59%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 91.891%

Changes Missing Coverage Covered Lines Changed/Added Lines %
tests/sqlparser_common.rs 22 24 91.67%
Totals Coverage Status
Change from base Build 191855500: 0.01%
Covered Lines: 4510
Relevant Lines: 4908

💛 - Coveralls

@eyalleshem eyalleshem force-pushed the table_function_2 branch 2 times, most recently from 06ee16b to d9a78aa Compare August 2, 2020 11:13
@eyalleshem eyalleshem requested a review from nickolay August 2, 2020 11:18
Copy link
Contributor

@nickolay nickolay left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! Waiting for @Dandandan to comment what the TABLE(...) formatting should be.

@eyalleshem eyalleshem force-pushed the table_function_2 branch 4 times, most recently from ff197b6 to 7297eb8 Compare August 4, 2020 14:46
@eyalleshem
Copy link
Contributor Author

sorry for all the commit's - i got into some mess between my branch's ,
But fixed now ..

@nickolay nickolay merged commit 61431b0 into apache:main Aug 5, 2020
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.

5 participants