flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fhueske <...@git.apache.org>
Subject [GitHub] flink pull request #3808: [FLINK-5884] [table] Integrate time indicators for...
Date Fri, 05 May 2017 00:12:18 GMT
Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3808#discussion_r114891828
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/CommonCalc.scala
---
    @@ -35,21 +34,30 @@ import scala.collection.JavaConverters._
     trait CommonCalc {
     
       private[flink] def functionBody(
    -      generator: CodeGenerator,
    -      inputType: TypeInformation[Row],
    -      rowType: RelDataType,
    -      calcProgram: RexProgram,
    -      config: TableConfig)
    +     generator: CodeGenerator,
    +     inputSchema: RowSchema,
    +     returnSchema: RowSchema,
    +     calcProgram: RexProgram,
    +     config: TableConfig)
         : String = {
     
    -    val returnType = FlinkTypeFactory.toInternalRowTypeInfo(rowType)
    +    val expandedExpressions = calcProgram
    +      .getProjectList
    +      .map(expr => calcProgram.expandLocalRef(expr))
    +      // time indicator fields must not be part of the code generation
    +      .filter(expr => !FlinkTypeFactory.isTimeIndicatorType(expr.getType))
    +      // update indices
    +      .map(expr => inputSchema.mapRexNode(expr))
    +
    +    val condition = if (calcProgram.getCondition != null) {
    +      inputSchema.mapRexNode(calcProgram.expandLocalRef(calcProgram.getCondition))
    --- End diff --
    
    The same happens with a SQL query


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

Mime
View raw message