Uh oh!
There was an error while loading. Please reload this page.
[SPARK-44577][SQL] Fix INSERT BY NAME returns nonsensical error message - #42220
[SPARK-44577][SQL] Fix INSERT BY NAME returns nonsensical error message#42220Hisoka-X wants to merge 7 commits into
Conversation
Hisoka-X
commented
Jul 29, 2023
cc @cloud-fan |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
cloud-fan
commented
Jul 31, 2023
can we update the PR description for the new changes? |
Hisoka-X
commented
Jul 31, 2023
Done |
cloud-fan
commented
Aug 1, 2023
For by-name insert, shall we just say "incompatible data columns"? The number of columns does match here. |
Hisoka-X
commented
Aug 1, 2023
Oh, let me align v1 and v2 errors. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
cloud-fan
commented
Aug 8, 2023
@MaxGekk does this PR align with your plan of unifying the assignment errors? |
MaxGekk
commented
Aug 8, 2023
@cloud-fan In my PR #42393, I am going to touch non- |
Hisoka-X
commented
Aug 17, 2023
Hi @cloud-fan@MaxGekk Shall we continue push on this PR? Thanks. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| }, | ||
| "EXTRA_FIELDS" : { | ||
| "message" : [ | ||
| "Cannot write extra fields <colName>." |
There was a problem hiding this comment.
it's one column or multiple columns?
There was a problem hiding this comment.
multiple columns, so I do some change, please check it again. Thanks.
cloud-fan
commented
Sep 1, 2023
thanks, merging to master/3.5! |
### What changes were proposed in this pull request? Fix INSERT BY NAME returns nonsensical error message on v1 datasource. eg: ```scala CREATE TABLE bug(c1 INT); INSERT INTO bug BY NAME SELECT 1 AS c2; ==> Multi-part identifier cannot be empty. ``` After PR: ```scala [INCOMPATIBLE_DATA_FOR_TABLE.CANNOT_FIND_DATA] Cannot write incompatible data for the table `spark_catalog`.`default`.`bug`: Cannot find data for the output column `c1`. ``` Also fixed the same issue when throwing other INCOMPATIBLE_DATA_FOR_TABLE type errors ### Why are the changes needed? Fix the error msg nonsensical. ### Does this PR introduce _any_ user-facing change? Yes, the error msg in v1 insert by name will be changed. ### How was this patch tested? add new test. Closes#42220 from Hisoka-X/SPARK-44577_insert_by_name_bug_fix. Authored-by: Jia Fan <fanjiaeminem@qq.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com> (cherry picked from commit 00f6699) Signed-off-by: Wenchen Fan <wenchen@databricks.com>
Hisoka-X
commented
Sep 1, 2023
Thanks @cloud-fan and @MaxGekk |
What changes were proposed in this pull request?
Fix INSERT BY NAME returns nonsensical error message on v1 datasource.
eg:
After PR:
Also fixed the same issue when throwing other INCOMPATIBLE_DATA_FOR_TABLE type errors
Why are the changes needed?
Fix the error msg nonsensical.
Does this PR introduce any user-facing change?
Yes, the error msg in v1 insert by name will be changed.
How was this patch tested?
add new test.