You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by wuchong <gi...@git.apache.org> on 2017/06/02 13:33:20 UTC

[GitHub] flink pull request #4055: [FLINK-6817] [table] Fix NPE when preceding is not...

GitHub user wuchong opened a pull request:

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

    [FLINK-6817] [table] Fix NPE when preceding is not set in OVER window

    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.
    
    - [ ] General
      - The pull request references the related JIRA issue ("[FLINK-XXX] Jira title text")
      - 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
    
    - [ ] 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/wuchong/flink over-npe

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

    https://github.com/apache/flink/pull/4055.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 #4055
    
----
commit 4de2f0fe38010c9824c2d26c0d33b01c7d0613b7
Author: Jark Wu <wu...@alibaba-inc.com>
Date:   2017-06-02T13:28:45Z

    [FLINK-6817] [table] Fix NPE when preceding is not set in OVER window

----


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

[GitHub] flink pull request #4055: [FLINK-6817] [table] Fix NPE when preceding is not...

Posted by sunjincheng121 <gi...@git.apache.org>.
Github user sunjincheng121 commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4055#discussion_r120023997
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/java/windows.scala ---
    @@ -127,3 +127,21 @@ class PartitionedOver(private val partitionByExpr: Array[Expression]) {
         new OverWindowWithOrderBy(partitionByExpr, orderByExpr)
       }
     }
    +
    +
    +class OverWindowWithOrderBy(
    +  private val partitionByExpr: Array[Expression],
    --- End diff --
    
    Suggest that change `partitionByExpr` to `partitionBy` for keep param name consistent with SCALA. What do you think?


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

[GitHub] flink pull request #4055: [FLINK-6817] [table] Fix NPE when preceding is not...

Posted by wuchong <gi...@git.apache.org>.
Github user wuchong commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4055#discussion_r119985514
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/windows.scala ---
    @@ -91,6 +91,10 @@ class OverWindowWithOrderBy(
         */
       def as(alias: Expression): OverWindow = {
     
    +    if (null == preceding) {
    --- End diff --
    
    Thank you. I think it's a good idea.


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

[GitHub] flink pull request #4055: [FLINK-6817] [table] Fix NPE when preceding is not...

Posted by sunjincheng121 <gi...@git.apache.org>.
Github user sunjincheng121 commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4055#discussion_r120024091
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/java/windows.scala ---
    @@ -127,3 +127,21 @@ class PartitionedOver(private val partitionByExpr: Array[Expression]) {
         new OverWindowWithOrderBy(partitionByExpr, orderByExpr)
    --- End diff --
    
    Suggest that change `partitionByExpr` to `partitionBy` for keep param name consistent with SCALA. What do you think?


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

[GitHub] flink pull request #4055: [FLINK-6817] [table] Fix NPE when preceding is not...

Posted by sunjincheng121 <gi...@git.apache.org>.
Github user sunjincheng121 commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4055#discussion_r119896926
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/windows.scala ---
    @@ -91,6 +91,10 @@ class OverWindowWithOrderBy(
         */
       def as(alias: Expression): OverWindow = {
     
    +    if (null == preceding) {
    --- End diff --
    
    For the strict system type, I recommend adding the `OverWindowWithPreceding` class to guide the user to do the correct operation.


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

[GitHub] flink issue #4055: [FLINK-6817] [table] Fix NPE when preceding is not set in...

Posted by wuchong <gi...@git.apache.org>.
Github user wuchong commented on the issue:

    https://github.com/apache/flink/pull/4055
  
    @sunjincheng121  I've added a `OverWindowWithPreceding` class


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

[GitHub] flink issue #4055: [FLINK-6817] [table] Fix NPE when preceding is not set in...

Posted by twalthr <gi...@git.apache.org>.
Github user twalthr commented on the issue:

    https://github.com/apache/flink/pull/4055
  
    I'm fine with this change. I think we should also include this in 1.3.1, what do you think @fhueske?


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

[GitHub] flink issue #4055: [FLINK-6817] [table] Fix NPE when preceding is not set in...

Posted by wuchong <gi...@git.apache.org>.
Github user wuchong commented on the issue:

    https://github.com/apache/flink/pull/4055
  
    merging...


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

[GitHub] flink pull request #4055: [FLINK-6817] [table] Fix NPE when preceding is not...

Posted by sunjincheng121 <gi...@git.apache.org>.
Github user sunjincheng121 commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4055#discussion_r120023733
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/java/windows.scala ---
    @@ -98,7 +98,7 @@ object Over {
         */
       def orderBy(orderBy: String): OverWindowWithOrderBy = {
         val orderByExpr = ExpressionParser.parseExpression(orderBy)
    -    new OverWindowWithOrderBy(Seq[Expression](), orderByExpr)
    +    new OverWindowWithOrderBy(Array[Expression](), orderByExpr)
    --- End diff --
    
    Good catch!
    And suggest to change the `java/windows.scala` as well. What do you think?


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

[GitHub] flink pull request #4055: [FLINK-6817] [table] Fix NPE when preceding is not...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


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

[GitHub] flink issue #4055: [FLINK-6817] [table] Fix NPE when preceding is not set in...

Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on the issue:

    https://github.com/apache/flink/pull/4055
  
    Yes, looks good to me as well. +1 for merging and including in 1.3.1


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