Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/8983#discussion_r41188938
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/HiveTypeCoercion.scala
 ---
    @@ -305,12 +305,17 @@ object HiveTypeCoercion {
     
       /**
        * Convert all expressions in in() list to the left operator type
    +   * except when the left operator type is NullType. In case when left hand
    +   * operator type is NullType create a Literal(Null).
        */
       object InConversion extends Rule[LogicalPlan] {
         def apply(plan: LogicalPlan): LogicalPlan = plan resolveExpressions {
           // Skip nodes who's children have not been resolved yet.
           case e if !e.childrenResolved => e
     
    +      case i @ In(a, b) if (a.dataType == NullType) =>
    +        Literal.create(null, BooleanType)
    --- End diff --
    
    instead of just casting null to boolean, can we come up with a better idea 
according to the data types of `b`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to