-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-31227][SQL] Non-nullable null type in complex types should not coerce to nullable type #27991
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-31227][SQL] Non-nullable null type in complex types should not coerce to nullable type #27991
Changes from all commits
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 |
|---|---|---|
|
|
@@ -1532,6 +1532,13 @@ class DataFrameFunctionsSuite extends QueryTest with SharedSparkSession { | |
| assert(e.getMessage.contains("string, binary or array")) | ||
| } | ||
|
|
||
| test("SPARK-31227: Non-nullable null type should not coerce to nullable type in concat") { | ||
|
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. How about
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. Yea, the output has the same type with array(null); Any concern? 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. Only that it should be tested, since it's an interesting corner case!
Member
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. I believe those cases are tested in |
||
| val actual = spark.range(1).selectExpr("concat(array(), array(1)) as arr") | ||
| val expected = spark.range(1).selectExpr("array(1) as arr") | ||
| checkAnswer(actual, expected) | ||
| assert(actual.schema === expected.schema) | ||
| } | ||
|
|
||
| test("flatten function") { | ||
| // Test cases with a primitive type | ||
| val intDF = Seq( | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.