maropu commented on a change in pull request #22038: [SPARK-25056][SQL] Unify 
the InConversion and BinaryComparison behavior
URL: https://github.com/apache/spark/pull/22038#discussion_r364527738
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala
 ##########
 @@ -495,9 +495,13 @@ object TypeCoercion {
           i
         }
 
-      case i @ In(a, b) if b.exists(_.dataType != a.dataType) =>
-        findWiderCommonType(i.children.map(_.dataType)) match {
-          case Some(finalDataType) => i.withNewChildren(i.children.map(Cast(_, 
finalDataType)))
+      case i @ In(value, list) if list.exists(_.dataType != value.dataType) =>
+        findWiderCommonType(list.map(_.dataType)) match {
+          case Some(listType) =>
+            val finalDataType = 
findCommonTypeForBinaryComparison(value.dataType, listType, conf)
 
 Review comment:
   Can you leave some comments about [the discussion 
above](https://github.com/apache/spark/pull/22038/files#r346201514)?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to