Github user aray commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18818#discussion_r131913185
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala
 ---
    @@ -453,6 +453,14 @@ case class Or(left: Expression, right: Expression) 
extends BinaryOperator with P
     
     abstract class BinaryComparison extends BinaryOperator with Predicate {
     
    +  override def inputType: AbstractDataType = AnyDataType
    --- End diff --
    
    We have to define `inputType` because it extends `BinaryOperator`. 
Previously the `LessThan`-like operators defined `inputType` was a subset of 
what they could actually support. This PR fixes that, but since the supported 
types can not be finitely specified as a type collection (there are a countably 
infinite number of legal `StructType`'s), we need to give a superset of what is 
actually supported for `inputType` and then do the real recursive check in 
`checkInputDataTypes`. This is much like how the `EqualTo` and `EqualNullSafe` 
operators were previously implemented. In this PR we just move that logic up to 
`BinaryComparison` as it's really the same for equality and inequality 
operators.
    
    Did that answer your concerns? 


---
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