-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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-19240][SQL][TEST] add test for setting location for managed table #16597
Conversation
Test build #71438 has finished for PR 16597 at commit
|
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.
Based on the current way, we should not allow users to change the location for the managed table. The definition of EXTERNAL
is different between Hive and Spark. When users provide a path in Spark SQL, we do not drop the data. This is our rule. Following this rule, if we allow it, we also need to change the type to EXTERNAL
.
LGTM cc @yhuai
I am not sure if it is worth breaking this behavior. If the table is a managed table, it is possible that existing behavior allows users to move a table from one managed place to another managed place (e.g. the location of a database is changed). It is not clear that breaking this behavior can give us any benefit. |
35520b0
to
a5687f8
Compare
Test build #71484 has started for PR 16597 at commit |
Just FYI, this only tests the behaviors of InMemoryCatalog. I will port it to The added test case LGTM to me. |
retest this please |
Test build #71491 has finished for PR 16597 at commit
|
thanks for the review, merging to master! |
## What changes were proposed in this pull request? SET LOCATION can also work on managed table(or table created without custom path), the behavior is a little weird, but as we have already supported it, we should add a test to explicitly show the behavior. ## How was this patch tested? N/A Author: Wenchen Fan <[email protected]> Closes apache#16597 from cloud-fan/set-location.
## What changes were proposed in this pull request? SET LOCATION can also work on managed table(or table created without custom path), the behavior is a little weird, but as we have already supported it, we should add a test to explicitly show the behavior. ## How was this patch tested? N/A Author: Wenchen Fan <[email protected]> Closes apache#16597 from cloud-fan/set-location.
What changes were proposed in this pull request?
SET LOCATION can also work on managed table(or table created without custom path), the behavior is a little weird, but as we have already supported it, we should add a test to explicitly show the behavior.
How was this patch tested?
N/A