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

    https://github.com/apache/spark/pull/16954#discussion_r103340272
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala
 ---
    @@ -123,19 +123,36 @@ case class Not(child: Expression)
      */
     @ExpressionDescription(
       usage = "expr1 _FUNC_(expr2, expr3, ...) - Returns true if `expr` equals 
to any valN.")
    -case class In(value: Expression, list: Seq[Expression]) extends Predicate
    -    with ImplicitCastInputTypes {
    +case class In(value: Expression, list: Seq[Expression]) extends Predicate {
     
       require(list != null, "list should not be null")
    -
    -  override def inputTypes: Seq[AbstractDataType] = value.dataType +: 
list.map(_.dataType)
    -
       override def checkInputDataTypes(): TypeCheckResult = {
    -    if (list.exists(l => l.dataType != value.dataType)) {
    -      TypeCheckResult.TypeCheckFailure(
    -        "Arguments must be same type")
    -    } else {
    -      TypeCheckResult.TypeCheckSuccess
    +    list match {
    +      case ListQuery(sub, _, _) :: Nil =>
    --- End diff --
    
    IIUC this is all done to get a better error message right?


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