Uh oh!
There was an error while loading. Please reload this page.
[SPARK-36241][SQL] Support creating tables with null column - #33488
[SPARK-36241][SQL] Support creating tables with null column#33488linhongliu-db wants to merge 4 commits into
Conversation
SparkQA
commented
Jul 23, 2021
Test build #141535 has finished for PR 33488 at commit
|
SparkQA
commented
Jul 23, 2021
Kubernetes integration test starting |
SparkQA
commented
Jul 23, 2021
Kubernetes integration test status success |
674d3f3 to
27eb8e1Compare27eb8e1 to
3e4cd4bCompareSparkQA
commented
Jul 26, 2021
Kubernetes integration test starting |
SparkQA
commented
Jul 26, 2021
Kubernetes integration test unable to build dist. exiting with code: 1 |
SparkQA
commented
Jul 26, 2021
Kubernetes integration test status success |
SparkQA
commented
Jul 26, 2021
Kubernetes integration test starting |
SparkQA
commented
Jul 26, 2021
Kubernetes integration test status success |
SparkQA
commented
Jul 26, 2021
Test build #141619 has finished for PR 33488 at commit
|
SparkQA
commented
Jul 26, 2021
Test build #141620 has finished for PR 33488 at commit
|
SparkQA
commented
Jul 26, 2021
Test build #141622 has finished for PR 33488 at commit
|
| "CREATE TABLE t2 AS SELECT null as null_col", | ||
| "Cannot create tables with null type") | ||
| "CREATE TABLE t2 STORED AS PARQUET AS SELECT null as null_col", | ||
| "Unknown field type: void") |
There was a problem hiding this comment.
parquet doesn't support null(spark)/void(hive) type
linhongliu-db
commented
Jul 26, 2021
cc @cloud-fan |
cloud-fan
commented
Jul 27, 2021
thanks, merging to master/3.2! (since it removes the constraint added in 3.2) |
### What changes were proposed in this pull request? Previously we blocked creating tables with the null column to follow the hive behavior in PR #28833 In this PR, I propose the restore the previous behavior to support the null column in a table. ### Why are the changes needed? For a complex query, it's possible to generate a column with null type. If this happens to the input query of CTAS, the query will fail due to Spark doesn't allow creating a table with null type. From the user's perspective, it’s hard to figure out why the null type column is produced in the complicated query and how to fix it. So removing this constraint is more friendly to users. ### Does this PR introduce _any_ user-facing change? Yes, this reverts the previous behavior change in #28833, for example, below command will success after this PR ```sql CREATE TABLE t (col_1 void, col_2 int) ``` ### How was this patch tested? newly added and existing test cases Closes#33488 from linhongliu-db/SPARK-36241-support-void-column. Authored-by: Linhong Liu <linhong.liu@databricks.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com> (cherry picked from commit 8e7e14d) Signed-off-by: Wenchen Fan <wenchen@databricks.com>
What changes were proposed in this pull request?
Previously we blocked creating tables with the null column to follow the hive behavior in PR #28833
In this PR, I propose the restore the previous behavior to support the null column in a table.
Why are the changes needed?
For a complex query, it's possible to generate a column with null type. If this happens to the input query of
CTAS, the query will fail due to Spark doesn't allow creating a table with null type. From the user's perspective,
it’s hard to figure out why the null type column is produced in the complicated query and how to fix it.
So removing this constraint is more friendly to users.
Does this PR introduce any user-facing change?
Yes, this reverts the previous behavior change in #28833, for example, below command will success after this PR
How was this patch tested?
newly added and existing test cases