You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by li...@apache.org on 2018/04/25 20:42:48 UTC
spark git commit: [SPARK-24012][SQL][TEST][FOLLOWUP] add unit test
Repository: spark
Updated Branches:
refs/heads/master 396938ef0 -> ac4ca7c4d
[SPARK-24012][SQL][TEST][FOLLOWUP] add unit test
## What changes were proposed in this pull request?
a followup of https://github.com/apache/spark/pull/21100
## How was this patch tested?
N/A
Author: Wenchen Fan <we...@databricks.com>
Closes #21154 from cloud-fan/test.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/ac4ca7c4
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/ac4ca7c4
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/ac4ca7c4
Branch: refs/heads/master
Commit: ac4ca7c4dd3ff666ec70aeb26ac84cffa557ee12
Parents: 396938e
Author: Wenchen Fan <we...@databricks.com>
Authored: Wed Apr 25 13:42:44 2018 -0700
Committer: gatorsmile <ga...@gmail.com>
Committed: Wed Apr 25 13:42:44 2018 -0700
----------------------------------------------------------------------
.../sql/catalyst/analysis/TypeCoercionSuite.scala | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/ac4ca7c4/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercionSuite.scala
----------------------------------------------------------------------
diff --git a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercionSuite.scala b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercionSuite.scala
index fd6a312..1cc431a 100644
--- a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercionSuite.scala
+++ b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercionSuite.scala
@@ -429,6 +429,24 @@ class TypeCoercionSuite extends AnalysisTest {
Some(StructType(Seq(StructField("a", IntegerType), StructField("B", IntegerType)))),
isSymmetric = false)
}
+
+ widenTest(
+ ArrayType(IntegerType, containsNull = true),
+ ArrayType(IntegerType, containsNull = false),
+ Some(ArrayType(IntegerType, containsNull = true)))
+
+ widenTest(
+ MapType(IntegerType, StringType, valueContainsNull = true),
+ MapType(IntegerType, StringType, valueContainsNull = false),
+ Some(MapType(IntegerType, StringType, valueContainsNull = true)))
+
+ widenTest(
+ new StructType()
+ .add("arr", ArrayType(IntegerType, containsNull = true), nullable = false),
+ new StructType()
+ .add("arr", ArrayType(IntegerType, containsNull = false), nullable = true),
+ Some(new StructType()
+ .add("arr", ArrayType(IntegerType, containsNull = true), nullable = true)))
}
test("wider common type for decimal and array") {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org