Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/19635#discussion_r148943889
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala
---
@@ -451,7 +451,10 @@ object TypeCoercion {
}
case i @ In(a, b) if b.exists(_.dataType != a.dataType) =>
- findWiderCommonType(i.children.map(_.dataType)) match {
+ findWiderCommonType(b.map(_.dataType)).flatMap { listDataType =>
+ findCommonTypeForBinaryComparison(listDataType, a.dataType)
+ .orElse(findWiderTypeForTwo(listDataType, a.dataType))
--- End diff --
What is the reason we need to call `findWiderTypeForTwo `?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]