-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-16498][SQL] move hive hack for data source table into HiveExternalCatalog #14155
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
Closed
Closed
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
b781ef8
use StructType in CatalogTable and remove CatalogColumn
cloud-fan dddda52
move hive hack for data source table into HiveExternalCatalog
cloud-fan 9ae7a71
Merge remote-tracking branch 'origin/master' into catalog-table
cloud-fan 4383590
more clean up
cloud-fan 2fc6838
Merge remote-tracking branch 'origin/master' into catalog-table
cloud-fan d66a8a8
one more clean up
cloud-fan a2bd4eb
fix ml
cloud-fan 9030c5b
Merge remote-tracking branch 'origin/master' into catalog-table
cloud-fan 4c2c41b
Merge remote-tracking branch 'origin/master' into catalog-table
cloud-fan ce1aff4
add storage properties checking back
cloud-fan 9b08cca
Merge remote-tracking branch 'origin/master' into catalog-table
cloud-fan fe1c6b4
Merge remote-tracking branch 'origin/master' into catalog-table
cloud-fan 8496069
address comments
cloud-fan 774a6dd
Merge remote-tracking branch 'origin/master' into catalog-table
cloud-fan 715c312
improve
cloud-fan 54fdbc6
Merge remote-tracking branch 'origin/master' into catalog-table
cloud-fan 96d57b6
more comments
cloud-fan 6ca8909
address comments
cloud-fan 38b838a
address comment
cloud-fan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
It sounds like we are not following the existing behaviors.
optionsmight be consumed by the external Data Source connectors.optionsis not only used for specifyingpath, but also used as a channel to pass extra parameters to the data source.I checked the existing implementation of
createDataSourceTable. We pass the originaloptionsinto the constructor ofDataSource. Then, thewriteAPI will pass theoptiontocreateRelation.How about adding it as an independent field in
CatalogTable?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.
Is it different from what we do at line https://github.com/apache/spark/pull/14155/files/96d57b665ac65750eb5c6f9757e5827ea9c14ca4#diff-945e51801b84b92da242fcb42f83f5f5R98?
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 put the options in
CatalogStorageFormat.properties, and when the table is read back, we will get the storage.properties as the data source options for create relation, see https://github.com/apache/spark/pull/14155/files#diff-d99813bd5bbc18277e4090475e4944cfR214Uh oh!
There was an error while loading. Please reload this page.
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.
That line is just putting the
optionsinto the storage properties. It works forpath, but the existing Spark code pass the user-specifiedoptionsintocreateRelation. I thinkoptionis a critical parameter-passing channel for the external data source connectors.Uh oh!
There was an error while loading. Please reload this page.
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.
@cloud-fan How about the write path? My previous reply to @yhuai is for the write path.
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.
nvm, it sounds like the
writeAPI is just called by CTAS and the save API of DataFrameWriter. It is OK. Let me read it again and check if we might have an issue foroptionsin the CREATE Data Source Table command.