-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-39799][SQL] DataSourceV2: View catalog interface #37556
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
Conversation
|
cc @dongjoon-hyun who had comments on the SPIP |
|
Thank you for pinging me, @holdenk . cc @viirya , @sunchao , @huaxingao , @aokolnychyi , @RussellSpitzer |
holdenk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks a good first PR for the view catalog interface to me, I think it would be useful to add a link to a working implementation of this (I think having API and impl come in seperately is fine but good to have a known impl of the API existing to know that we've got a working version of it present).
sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/View.java
Outdated
Show resolved
Hide resolved
|
Find this message strange from https://github.com/jzhuge/spark/runs/7886846067?check_suite_focus=true: This PR does not change module |
|
Interesting, the failure in |
766b6dd to
f675201
Compare
|
pending CI and any other concerns from others I plan to merge this on Friday. |
|
Looking at error: |
sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/View.java
Outdated
Show resolved
Hide resolved
sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/ViewCatalog.java
Outdated
Show resolved
Hide resolved
d325925 to
cd0c2a2
Compare
sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/ViewCatalog.java
Outdated
Show resolved
Hide resolved
|
Puzzled by this pyspark test failures. Seems unrelated. |
|
Current diff LGTM. We've been testing this out internally (including changes from the umbrella PR as well) and with the recent changes I think this PR looks like it should set us up for success with the rest of the feature. |
Fixed |
|
LGTM I'll merge this now to the current dev branch. |
|
Thanks @holdenk, @wmoustafa, @xkrogen, @ljfgem for the reviews! |
| String[] columnComments(); | ||
|
|
||
| /** | ||
| * The view properties. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a strong opinion, but shall we put everything (except for the query and schema) into view properties with reserved property keys? TableCatalog was designed this way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback!
The goal is to capture the entire CREATE VIEW syntax in API. Leave the choice to catalog plugin developers on whether to use properties to implement the APIs. I'd expect HMS-backed view catalog implementation will continue to do so the same as the current v1 implementation. On the other hand, view catalog plugins that support more free-form storage formats such as JSON can choose a different approach.
### What changes were proposed in this pull request? ViewCatalog API described in [SPIP](https://docs.google.com/document/d/1XOxFtloiMuW24iqJ-zJnDzHl2KMxipTjJoxleJFz66A/edit?usp=sharing). ### Why are the changes needed? First step towards DataSourceV2 view support. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? N/A Closes apache#37556 from jzhuge/SPARK-39799. Authored-by: John Zhuge <[email protected]> Signed-off-by: Holden Karau <[email protected]>
### What changes were proposed in this pull request? ViewCatalog API described in [SPIP](https://docs.google.com/document/d/1XOxFtloiMuW24iqJ-zJnDzHl2KMxipTjJoxleJFz66A/edit?usp=sharing). ### Why are the changes needed? First step towards DataSourceV2 view support. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? N/A Closes apache#37556 from jzhuge/SPARK-39799. Authored-by: John Zhuge <[email protected]> Signed-off-by: Holden Karau <[email protected]>
### What changes were proposed in this pull request? ViewCatalog API described in [SPIP](https://docs.google.com/document/d/1XOxFtloiMuW24iqJ-zJnDzHl2KMxipTjJoxleJFz66A/edit?usp=sharing). ### Why are the changes needed? First step towards DataSourceV2 view support. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? N/A Closes apache#37556 from jzhuge/SPARK-39799. Authored-by: John Zhuge <[email protected]> Signed-off-by: Holden Karau <[email protected]>
…iewCatalog ### What changes were proposed in this pull request? ViewCatalog API improvements described in [SPIP](https://docs.google.com/document/d/1XOxFtloiMuW24iqJ-zJnDzHl2KMxipTjJoxleJFz66A/edit?usp=sharing) that didn't make it into the codebase as part of #37556 ### Why are the changes needed? Required for DataSourceV2 view support. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? N/A ### Was this patch authored or co-authored using generative AI tooling? N/A Closes #43677 from nastra/SPARK-45807. Authored-by: Eduard Tudenhoefner <[email protected]> Signed-off-by: Holden Karau <[email protected]>
…iewCatalog ### What changes were proposed in this pull request? ViewCatalog API improvements described in [SPIP](https://docs.google.com/document/d/1XOxFtloiMuW24iqJ-zJnDzHl2KMxipTjJoxleJFz66A/edit?usp=sharing) that didn't make it into the codebase as part of apache#37556 ### Why are the changes needed? Required for DataSourceV2 view support. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? N/A ### Was this patch authored or co-authored using generative AI tooling? N/A Closes apache#43677 from nastra/SPARK-45807. Authored-by: Eduard Tudenhoefner <[email protected]> Signed-off-by: Holden Karau <[email protected]>
What changes were proposed in this pull request?
ViewCatalog API described in SPIP.
Why are the changes needed?
First step towards DataSourceV2 view support.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
N/A