Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-6941

Selecting window start / end on over window causes field not resolve exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4.0
    • 1.3.1, 1.4.0
    • Table SQL / API
    • None

    Description

      Selecting window start / end on over window causes field not resolve exception.
      The following program:

      table
            .window(
              Over partitionBy 'c orderBy 'proctime preceding UNBOUNDED_ROW as 'w)
            .select('c, countFun('b) over 'w, 'w.start, 'w.end)
      

      causes

      org.apache.flink.table.api.ValidationException: Cannot resolve [w] given input [a, b, c, proctime].
      
      	at org.apache.flink.table.plan.logical.LogicalNode.failValidation(LogicalNode.scala:143)
      	at org.apache.flink.table.plan.logical.LogicalNode$$anonfun$validate$1.applyOrElse(LogicalNode.scala:86)
      	at org.apache.flink.table.plan.logical.LogicalNode$$anonfun$validate$1.applyOrElse(LogicalNode.scala:83)
      	at org.apache.flink.table.plan.TreeNode.postOrderTransform(TreeNode.scala:72)
      	at org.apache.flink.table.plan.TreeNode$$anonfun$1.apply(TreeNode.scala:46)
      	at scala.collection.Iterator$$anon$11.next(Iterator.scala:328)
      	at scala.collection.Iterator$class.foreach(Iterator.scala:727)
      	at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
      	at scala.collection.generic.Growable$class.$plus$plus$eq(Growable.scala:48)
      

      We should validate that the start and end window properties are not accessed on over windows.

      Attachments

        Issue Links

          Activity

            People

              sunjincheng121 sunjincheng
              sunjincheng121 sunjincheng
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: