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)
      

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user sunjincheng121 opened a pull request:

          https://github.com/apache/flink/pull/3841

          FLINK-6479[table]Fix IndexOutOfBoundsException bug

          Thanks for contributing to Apache Flink. Before you open your pull request, please take the following check list into consideration.
          If your changes take all of the items into account, feel free to open your pull request. For more information and/or questions please refer to the [How To Contribute guide](http://flink.apache.org/how-to-contribute.html).
          In addition to going through the list, please provide a meaningful description of your changes.

          • [x] General
          • The pull request references the related JIRA issue ("FLINK-6479[table]Fix IndexOutOfBoundsException bug")
          • The pull request addresses only one issue
          • Each commit in the PR has a meaningful commit message (including the JIRA id)
          • [ ] Documentation
          • Documentation has been added for new functionality
          • Old documentation affected by the pull request has been updated
          • JavaDoc for public methods has been added
          • [x] Tests & Build
          • Functionality added by the pull request is covered by tests
          • `mvn clean verify` has been executed successfully locally or a Travis build has passed

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/sunjincheng121/flink FLINK-6479-PR

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/flink/pull/3841.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #3841


          commit fe45c794d7ee4c5b44f7b5d5e571a1b112cd6696
          Author: sunjincheng121 <sunjincheng121@gmail.com>
          Date: 2017-05-08T08:41:31Z

          FLINK-6479[table]Fix IndexOutOfBoundsException bug


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user sunjincheng121 opened a pull request: https://github.com/apache/flink/pull/3841 FLINK-6479 [table] Fix IndexOutOfBoundsException bug Thanks for contributing to Apache Flink. Before you open your pull request, please take the following check list into consideration. If your changes take all of the items into account, feel free to open your pull request. For more information and/or questions please refer to the [How To Contribute guide] ( http://flink.apache.org/how-to-contribute.html ). In addition to going through the list, please provide a meaningful description of your changes. [x] General The pull request references the related JIRA issue (" FLINK-6479 [table] Fix IndexOutOfBoundsException bug") The pull request addresses only one issue Each commit in the PR has a meaningful commit message (including the JIRA id) [ ] Documentation Documentation has been added for new functionality Old documentation affected by the pull request has been updated JavaDoc for public methods has been added [x] Tests & Build Functionality added by the pull request is covered by tests `mvn clean verify` has been executed successfully locally or a Travis build has passed You can merge this pull request into a Git repository by running: $ git pull https://github.com/sunjincheng121/flink FLINK-6479 -PR Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3841.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3841 commit fe45c794d7ee4c5b44f7b5d5e571a1b112cd6696 Author: sunjincheng121 <sunjincheng121@gmail.com> Date: 2017-05-08T08:41:31Z FLINK-6479 [table] Fix IndexOutOfBoundsException bug
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user fhueske commented on the issue:

          https://github.com/apache/flink/pull/3841

          Thanks for fixing this bug @sunjincheng121!
          Will merge this later.

          Show
          githubbot ASF GitHub Bot added a comment - Github user fhueske commented on the issue: https://github.com/apache/flink/pull/3841 Thanks for fixing this bug @sunjincheng121! Will merge this later.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/flink/pull/3841

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/3841
          Hide
          fhueske Fabian Hueske added a comment -

          Fixed for 1.3.0 with 4556b49c80108e83d67a56ac5039f631dd681a96
          Fixed for 1.4.0 with f26a911627204519a78ccc57b1f12b387d85e43b

          Show
          fhueske Fabian Hueske added a comment - Fixed for 1.3.0 with 4556b49c80108e83d67a56ac5039f631dd681a96 Fixed for 1.4.0 with f26a911627204519a78ccc57b1f12b387d85e43b

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development