Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/21074#discussion_r182595455
--- Diff:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercionSuite.scala
---
@@ -572,6 +575,16 @@ class TypeCoercionSuite extends AnalysisTest {
Coalesce(Seq(nullLit, floatNullLit, doubleLit, stringLit)),
Coalesce(Seq(Cast(nullLit, StringType), Cast(floatNullLit,
StringType),
Cast(doubleLit, StringType), Cast(stringLit, StringType))))
+
+ ruleTest(rule,
+ Coalesce(Seq(timestampLit, intLit, stringLit)),
+ Coalesce(Seq(Cast(timestampLit, StringType), Cast(intLit,
StringType),
+ Cast(stringLit, StringType))))
+
+ ruleTest(rule,
+ Coalesce(Seq(tsArrayLit, intArrayLit, strArrayLit)),
+ Coalesce(Seq(Cast(tsArrayLit, ArrayType(StringType)),
+ Cast(intArrayLit, ArrayType(StringType)), Cast(strArrayLit,
ArrayType(StringType)))))
--- End diff --
Could you add an end to end test case that can trigger this?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]