[ https://issues.apache.org/jira/browse/FLINK-6012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15960637#comment-15960637 ]
ASF GitHub Bot commented on FLINK-6012: --------------------------------------- Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/3693#discussion_r110360562 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/rules/common/WindowExpressionRule.scala --- @@ -0,0 +1,117 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.flink.table.plan.rules.common + +import org.apache.calcite.plan.hep.HepRelVertex +import org.apache.calcite.plan.{RelOptRule, RelOptRuleCall} +import org.apache.calcite.rel.RelNode +import org.apache.calcite.rel.logical.LogicalProject +import org.apache.calcite.rex.{RexCall, RexNode} +import org.apache.calcite.sql.fun.SqlStdOperatorTable +import org.apache.flink.table.calcite.FlinkRelBuilder.NamedWindowProperty +import org.apache.flink.table.expressions.{WindowEnd, WindowStart} +import org.apache.flink.table.plan.logical._ +import org.apache.flink.table.plan.logical.rel.LogicalWindowAggregate + +import scala.collection.JavaConversions._ + +class WindowExpressionRule + extends RelOptRule( + WindowExpressionRule.WINDOW_EXPRESSION_RULE_PREDICATE, + "WindowExpressionRule") { + override def matches(call: RelOptRuleCall): Boolean = { + val project = call.rel(0).asInstanceOf[LogicalProject] + val found = project.getProjects.find { --- End diff -- use `exists()` instead of `find()` > Support WindowStart / WindowEnd functions in streaming SQL > ---------------------------------------------------------- > > Key: FLINK-6012 > URL: https://issues.apache.org/jira/browse/FLINK-6012 > Project: Flink > Issue Type: Sub-task > Components: Table API & SQL > Reporter: Haohui Mai > Assignee: Haohui Mai > > This jira proposes to add support for {{TUMBLE_START()}} / {{TUMBLE_END()}} / > {{HOP_START()}} / {{HOP_END()}} / {{SESSUIB_START()}} / {{SESSION_END()}} in > the planner in Flink. -- This message was sent by Atlassian JIRA (v6.3.15#6346)