Skip to content

Distinguish between SELECT * FROM foo and SELECT * FROM foo() #506

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
May 25, 2022

Conversation

ghost
Copy link

@ghost ghost commented May 24, 2022

Fixes #405. As stated in that issue,

This is apparently a regression that was introduced in 5652b46 (#73)

To fix it, I reintroduced the Option around the vector of arguments, which was removed in 5652b46 even though it wasn't actually redundant. I also added a test which ensures that SELECT * FROM fn() is not modified after a serialization round-trip, and I added a brief explanation of the different meanings of None and Some (including Some(vec![])) to the documentation.

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.

LGTM -- thank you @razzolini-qpq

@@ -337,7 +337,11 @@ pub enum TableFactor {
/// Arguments of a table-valued function, as supported by Postgres
/// and MSSQL. Note that deprecated MSSQL `FROM foo (NOLOCK)` syntax
/// will also be parsed as `args`.
args: Vec<FunctionArg>,
///
/// This field's value is `Some(v)`, where `v` is a (possibly empty)
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@coveralls
Copy link

Pull Request Test Coverage Report for Build 2376533905

  • 27 of 27 (100.0%) changed or added relevant lines in 8 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 89.819%

Totals Coverage Status
Change from base Build 2367540025: 0.002%
Covered Lines: 8319
Relevant Lines: 9262

💛 - Coveralls

@alamb alamb merged commit 901f5b9 into apache:main May 25, 2022
@ghost ghost deleted the nullary-table-functions branch May 26, 2022 07:36
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.

Cannot distinguish between SELECT * FROM foo and SELECT * FROM foo()
2 participants