flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wuchong <...@git.apache.org>
Subject [GitHub] flink pull request #4199: [FLINK-6584] [table] Support multiple consecutive ...
Date Thu, 29 Jun 2017 07:54:56 GMT
Github user wuchong commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4199#discussion_r124733642
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/rules/common/WindowStartEndPropertiesRule.scala
---
    @@ -54,34 +56,75 @@ class WindowStartEndPropertiesRule
         val project = call.rel(0).asInstanceOf[LogicalProject]
         val innerProject = call.rel(1).asInstanceOf[LogicalProject]
         val agg = call.rel(2).asInstanceOf[LogicalWindowAggregate]
    +    val window = agg.getWindow
     
    -    // Retrieve window start and end properties
    +    val isRowtime = isRowtimeAttribute(window.timeAttribute)
    +    val isProctime = isProctimeAttribute(window.timeAttribute)
    +
    +    val startEndProperties = Seq(
    +      NamedWindowProperty("w$start", WindowStart(window.aliasAttribute)),
    +      NamedWindowProperty("w$end", WindowEnd(window.aliasAttribute)))
    +
    +    // allow rowtime/proctime for rowtime windows and proctime for proctime windows
    +    val timeProperties = if (isRowtime) {
    +      Seq(
    +        NamedWindowProperty("w$rowtime", RowtimeAttribute(window.aliasAttribute)),
    --- End diff --
    
    We have so many `w$...` here, can we create the String constants and reference them ?



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