-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-18183] [SPARK-18184] Fix INSERT [INTO|OVERWRITE] TABLE ... PARTITION for Datasource tables #15705
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
[SPARK-18183] [SPARK-18184] Fix INSERT [INTO|OVERWRITE] TABLE ... PARTITION for Datasource tables #15705
Changes from all commits
dee4b9e
d99afac
137aeb2
8da8b0f
d5a7bd3
a833a19
587b85e
669e6cc
fec7c9e
07c6787
0daff74
ca31f35
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,7 +67,10 @@ class CatalogFileIndex( | |
| val selectedPartitions = sparkSession.sessionState.catalog.listPartitionsByFilter( | ||
| table.identifier, filters) | ||
| val partitions = selectedPartitions.map { p => | ||
| PartitionPath(p.toRow(partitionSchema), p.storage.locationUri.get) | ||
| val path = new Path(p.storage.locationUri.get) | ||
| val fs = path.getFileSystem(hadoopConf) | ||
| PartitionPath( | ||
| p.toRow(partitionSchema), path.makeQualified(fs.getUri, fs.getWorkingDirectory)) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why this change? Doesn't
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Apparently not. The unit test actually fails if you do that, since the path seems to be missing the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But we will qualify it before writing to it at here, doesn't it work?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The issue is that the user can store arbitrary string paths with |
||
| } | ||
| val partitionSpec = PartitionSpec(partitionSchema, partitions) | ||
| new PrunedInMemoryFileIndex( | ||
|
|
||
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.
do we need to consider dynamic partition here?