flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yjshen <...@git.apache.org>
Subject [GitHub] flink pull request: [FLINK-3754][Table]Add a validation phase befo...
Date Wed, 11 May 2016 14:13:21 GMT
Github user yjshen commented on a diff in the pull request:

    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/expressions/call.scala
    @@ -18,85 +18,26 @@
     package org.apache.flink.api.table.expressions
     import org.apache.calcite.rex.RexNode
    -import org.apache.calcite.sql.SqlOperator
    -import org.apache.calcite.sql.fun.SqlStdOperatorTable
     import org.apache.calcite.tools.RelBuilder
    +import org.apache.flink.api.table.validate.{ExprValidationResult, ValidationFailure}
       * General expression for unresolved function calls. The function can be a built-in
       * scalar function or a user-defined scalar function.
    -case class Call(functionName: String, args: Expression*) extends Expression {
    +case class Call(functionName: String, args: Seq[Expression]) extends Expression {
    --- End diff --
    While I was resolving `Call` into solid expressions, `FunctionCatalog` is used and its
`withChildren`  method is looking up constructors to create new `expression` as follows: 
    1. look up expressions take `Seq[Expression]` as argument
    2. if 1 is not fulfilled, look up the constructor match exactly the number of arguments,
like the `MyFunc` example you provided.
    Does this make sense?

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 infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message