-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-21150][SQL] Persistent view stored in Hive metastore should be case preserving #18360
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
| val tableLocation = if (needDefaultTableLocation) { | ||
| Some(CatalogUtils.stringToURI(defaultTablePath(tableDefinition.identifier))) | ||
| } else { | ||
| // Ideally we should not create a managed table with location, but Hive serde table can |
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 change is actually small, just rearrange the if-else to make view and hive serde table fall into the same branch.
|
LGTM |
|
Oh. I just thought there might be an issue when doing The So once we replace an existing view, the schema properties will not be there anymore. |
|
Test build #78277 has finished for PR 18360 at commit
|
|
@viirya good catch! fixed |
|
Test build #78289 has finished for PR 18360 at commit
|
gatorsmile
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.
LGTM
|
Thanks! Merging to master/2.2 |
… case preserving ## What changes were proposed in this pull request? This is a regression in Spark 2.2. In Spark 2.2, we introduced a new way to resolve persisted view: https://issues.apache.org/jira/browse/SPARK-18209 , but this makes the persisted view non case-preserving because we store the schema in hive metastore directly. We should follow data source table and store schema in table properties. ## How was this patch tested? new regression test Author: Wenchen Fan <[email protected]> Closes #18360 from cloud-fan/view. (cherry picked from commit e862dc9) Signed-off-by: gatorsmile <[email protected]>
… case preserving ## What changes were proposed in this pull request? This is a regression in Spark 2.2. In Spark 2.2, we introduced a new way to resolve persisted view: https://issues.apache.org/jira/browse/SPARK-18209 , but this makes the persisted view non case-preserving because we store the schema in hive metastore directly. We should follow data source table and store schema in table properties. ## How was this patch tested? new regression test Author: Wenchen Fan <[email protected]> Closes apache#18360 from cloud-fan/view.
What changes were proposed in this pull request?
This is a regression in Spark 2.2. In Spark 2.2, we introduced a new way to resolve persisted view: https://issues.apache.org/jira/browse/SPARK-18209 , but this makes the persisted view non case-preserving because we store the schema in hive metastore directly. We should follow data source table and store schema in table properties.
How was this patch tested?
new regression test