Github user chenghao-intel commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7034#discussion_r33418336
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/HiveTypeCoercion.scala
 ---
    @@ -725,4 +727,33 @@ trait HiveTypeCoercion {
             e.withNewChildren(newC)
         }
       }
    +
    +  /**
    +   * Validate the data type for expression, and casts types as required, 
the expression should be
    +   * [[ExpressionConstraint]].
    +   */
    +  object DataTypeConstraintValidation extends Rule[LogicalPlan] {
    +
    +    def apply(plan: LogicalPlan): LogicalPlan = plan 
transformAllExpressions {
    +      // Skip nodes who's children have not been resolved yet.
    +      case e if !e.childrenResolved => e
    +
    +      case e: ExpressionConstraint =>
    +        val newChildren = e.children.zip(e.constraint).map { case (expr, 
constraint) =>
    --- End diff --
    
    I thought that also, but this is will be solved during the debugging time, 
and in a release version, we never run into the case `e.children.length != 
e.constraint.length`, doesn't it?


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to