-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-16803] [SQL] SaveAsTable does not work when source DataFrame is built on a Hive Table #14612
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
|
Test build #63645 has finished for PR 14612 at commit
|
71399f1 to
d2b2d91
Compare
|
Test build #66252 has finished for PR 14612 at commit
|
|
cc @cloud-fan @yhuai |
|
retest this please |
|
Test build #68248 has finished for PR 14612 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.
is it possible that we can extract the similar logic in CreateDataSourceTableAsSelectCommand here?
|
hi @gatorsmile do you have time to work on it? I'd like to get this into 2.1 |
|
Sure, will finish this tomorrow. |
d2b2d91 to
3035cfe
Compare
|
Test build #68495 has finished for PR 14612 at commit
|
| c | ||
|
|
||
| case c @ CreateTable(tableDesc, mode, Some(query)) | ||
| if mode == SaveMode.Append && isHiveSerdeTable(tableDesc.identifier) => |
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.
can we consolidate hive and data source table here?
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.
Let me try another way to fix it. Will submit a new PR.
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.
uh... Actually, I found another bug in our write path.
What changes were proposed in this pull request?
In Spark 2.0,
SaveAsTabledoes not work when source DataFrame is built on a Hive Table, but Spark 1.6 works.Spark 1.6
Spark 2.0
This PR is to provide a support with by-name resolution. In 1.6, it is by-position resolution. The previous behavior is wrong. We need to adjust the order.
How was this patch tested?
Test cases are added