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

    https://github.com/apache/flink/pull/1916#discussion_r61378085
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/expressions/Expression.scala
 ---
    @@ -17,13 +17,34 @@
      */
     package org.apache.flink.api.table.expressions
     
    -import java.util.concurrent.atomic.AtomicInteger
    -
     import org.apache.calcite.rex.RexNode
     import org.apache.calcite.tools.RelBuilder
     
    -abstract class Expression extends TreeNode[Expression] { self: Product =>
    -  def name: String = Expression.freshName("expression")
    +import org.apache.flink.api.common.typeinfo.TypeInformation
    +import org.apache.flink.api.table.trees.TreeNode
    +import org.apache.flink.api.table.validate.ExprValidationResult
    +
    +abstract class Expression extends TreeNode[Expression] {
    +  /**
    +    * Returns the [[TypeInformation]] for evaluating this expression.
    +    * It is sometimes available until the expression is valid.
    +    */
    +  def dataType: TypeInformation[_]
    +
    +  /**
    +    * One pass validation of the expression tree in post order.
    +    */
    +  lazy val valid: Boolean = childrenValid && validateInput().isSuccess
    +
    +  def childrenValid: Boolean = children.forall(_.valid)
    +
    +  /**
    +    * Check input data types, inputs number or other properties specified 
by this expression.
    +    * Return `ValidationSuccess` if it pass the check,
    +    * or `ValidationFailure` with supplement message explaining the error.
    +    * Note: we should only call this method until `childrenValidated == 
true`
    --- End diff --
    
    Ah, yes!


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

Reply via email to