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

Fix IndexOutOfBoundsException bug

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.0
    • Fix Version/s: 1.3.0, 1.4.0
    • Component/s: Table API & SQL
    • Labels:
      None

      Description

          val windowedTable = table
            .window(Slide over 2.rows every 1.rows on 'proctime as 'w)
            .groupBy('w, 'string)
            .select(weightAvgFun('long, 'int))
      

      will got exception:

      java.lang.IndexOutOfBoundsException: index (2) must be less than size (2)
      
      	at com.google.common.base.Preconditions.checkElementIndex(Preconditions.java:310)
      	at com.google.common.base.Preconditions.checkElementIndex(Preconditions.java:292)
      	at com.google.common.collect.RegularImmutableList.get(RegularImmutableList.java:65)
      	at org.apache.calcite.util.Pair$6.get(Pair.java:347)
      	at scala.collection.convert.Wrappers$JListWrapper.apply(Wrappers.scala:88)
      	at org.apache.flink.table.plan.nodes.CommonAggregate$$anonfun$groupingToString$1.apply(CommonAggregate.scala:34)
      	at org.apache.flink.table.plan.nodes.CommonAggregate$$anonfun$groupingToString$1.apply(CommonAggregate.scala:34)
      	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
      	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
      	at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
      	at scala.collection.mutable.ArrayOps$ofInt.foreach(ArrayOps.scala:156)
      	at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
      	at scala.collection.mutable.ArrayOps$ofInt.map(ArrayOps.scala:156)
      	at org.apache.flink.table.plan.nodes.CommonAggregate$class.groupingToString(CommonAggregate.scala:34)
      	at org.apache.flink.table.plan.nodes.datastream.DataStreamGroupWindowAggregate.groupingToString(DataStreamGroupWindowAggregate.scala:44)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sunjincheng121 sunjincheng
                Reporter:
                sunjincheng121 sunjincheng
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: