add catalog as part of the table path in plan_to_sql#10612
Merged
alamb merged 2 commits intoapache:mainfrom May 23, 2024
y-f-u:main
Merged
add catalog as part of the table path in plan_to_sql#10612alamb merged 2 commits intoapache:mainfrom y-f-u:main
alamb merged 2 commits intoapache:mainfrom
y-f-u:main
Conversation
phillipleblanc
approved these changes
May 22, 2024
Co-authored-by: Phillip LeBlanc <phillip@leblanc.tech>
alamb
approved these changes
May 22, 2024
Contributor
alamb
left a comment
There was a problem hiding this comment.
Thank you @y-f-u
And thank you for the review @phillipleblanc
It is somewhat hard to find the exsting tests for sql_to_plan. That might be nice to improve sometime
| Field::new("id", DataType::Utf8, false), | ||
| Field::new("value", DataType::Utf8, false), | ||
| ]); | ||
| let plan = table_scan(Some(table_name), &schema, None) |
Contributor
There was a problem hiding this comment.
Since this is testing plan_to_sql it might make more sense to put it with the rest of the tests for plan_to_sql: https://github.com/apache/datafusion/blob/main/datafusion/sql/tests/sql_integration.rs#L4669
However, the fact that those tests don't have "plan_to_sql" in their name is confusing too.
Maybe we could consolidate the tests into something like datafusion/sql/tests/sql_integration/plan_to_sql.rs 🤔 (as a follow on PR)
Contributor
|
Thanks again @y-f-u and @phillipleblanc |
findepi
pushed a commit
to findepi/datafusion
that referenced
this pull request
Jul 16, 2024
* add catalog as part of the table path in plan_to_sql * Update datafusion/sql/src/unparser/plan.rs Co-authored-by: Phillip LeBlanc <phillip@leblanc.tech> --------- Co-authored-by: Phillip LeBlanc <phillip@leblanc.tech>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
TableReference has the catalog information but it's not used in
plan_to_sqlPart of #9494
Rationale for this change
It's common for DBMS to have pattern of
[catalog.][schema.]table_namein SQL statement. E.g. snowflake.What changes are included in this PR?
Are these changes tested?
Yes
Are there any user-facing changes?
No