-
Notifications
You must be signed in to change notification settings - Fork 29.3k
[SPARK-20680][SQL] Spark-sql do not support for creating table with void column datatype #28833
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
Changes from 5 commits
fda353f
1e86674
3b8ddec
cf0db98
479901d
5aa4c1a
fdf57bf
de08967
d6f1a4b
98d12fe
31ba0bf
9ad57d1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ select typeof(null) | |
| -- !query schema | ||
| struct<typeof(NULL):string> | ||
| -- !query output | ||
| null | ||
| void | ||
|
|
||
|
|
||
| -- !query | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2309,6 +2309,22 @@ class HiveDDLSuite | |
| } | ||
| } | ||
|
|
||
| test("SPARK-20680: Spark-sql do not support for void column datatype of view") { | ||
| withTable("t") { | ||
| withView("tabNullType") { | ||
| val client = | ||
| spark.sharedState.externalCatalog.unwrapped.asInstanceOf[HiveExternalCatalog].client | ||
|
LantaoJin marked this conversation as resolved.
Outdated
|
||
| client.runSqlHive("CREATE TABLE t (t1 int)") | ||
| client.runSqlHive("INSERT INTO t VALUES (3)") | ||
| client.runSqlHive("CREATE VIEW tabNullType AS SELECT NULL AS col FROM t") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. table |
||
| checkAnswer(spark.table("tabNullType"), Row(null)) | ||
| // table description shows "void" representation for NULL type. | ||
| val desc = spark.sql("DESC tabNullType").collect().toSeq | ||
| assert(desc.contains(Row("col", "void", null))) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| test("SPARK-21216: join with a streaming DataFrame") { | ||
| import org.apache.spark.sql.execution.streaming.MemoryStream | ||
| import testImplicits._ | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.