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

Java Table API cannot parse function names starting with keywords

    Details

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

      Description

      The ExpressionParser of the Java Table API has problems with functions that start with a reserved keyword. e.g. a function must not be called summing because sum is reserved.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user twalthr opened a pull request:

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

          FLINK-6587 [table] Simplification and bug fixing of the ExpressionParser

          This PR fixes several issues related to the ExpressionParser and the resolution of expression produced by it. Only special cases are handled by the parser, other expressions will resolved by the function catalog. I also updated the data types such that they are in sync with `org.apache.flink.table.api.Types`.

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

          $ git pull https://github.com/twalthr/flink FLINK-6587

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

          https://github.com/apache/flink/pull/3923.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 #3923


          commit 2269ebbd33f6ed744fd68c2771599a07dcb49970
          Author: twalthr <twalthr@apache.org>
          Date: 2017-05-15T13:27:10Z

          FLINK-6587 [table] Simplification and bug fixing of the ExpressionParser


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user twalthr opened a pull request: https://github.com/apache/flink/pull/3923 FLINK-6587 [table] Simplification and bug fixing of the ExpressionParser This PR fixes several issues related to the ExpressionParser and the resolution of expression produced by it. Only special cases are handled by the parser, other expressions will resolved by the function catalog. I also updated the data types such that they are in sync with `org.apache.flink.table.api.Types`. You can merge this pull request into a Git repository by running: $ git pull https://github.com/twalthr/flink FLINK-6587 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3923.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 #3923 commit 2269ebbd33f6ed744fd68c2771599a07dcb49970 Author: twalthr <twalthr@apache.org> Date: 2017-05-15T13:27:10Z FLINK-6587 [table] Simplification and bug fixing of the ExpressionParser
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user shaoxuan-wang commented on the issue:

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

          @twalthr, it seems we have reserved the keyword with the case insensitive. For instance, we cannot use "Sum" and "SUM", as "sum" is reserved. Did we intent to filter the keyword like this?

          Show
          githubbot ASF GitHub Bot added a comment - Github user shaoxuan-wang commented on the issue: https://github.com/apache/flink/pull/3923 @twalthr, it seems we have reserved the keyword with the case insensitive. For instance, we cannot use "Sum" and "SUM", as "sum" is reserved. Did we intent to filter the keyword like this?
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user twalthr commented on the issue:

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

          @shaoxuan-wang the function catalog is case insensitive anyway. With this PR we have almost no keywords anymore. So a "sum" could be overwritten by "SUM".

          Show
          githubbot ASF GitHub Bot added a comment - Github user twalthr commented on the issue: https://github.com/apache/flink/pull/3923 @shaoxuan-wang the function catalog is case insensitive anyway. With this PR we have almost no keywords anymore. So a "sum" could be overwritten by "SUM".
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user fhueske commented on the issue:

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

          The PR looks good to me. +1 from my side.

          Show
          githubbot ASF GitHub Bot added a comment - Github user fhueske commented on the issue: https://github.com/apache/flink/pull/3923 The PR looks good to me. +1 from my side.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

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

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/3923
          Hide
          twalthr Timo Walther added a comment -

          Fixed in 1.4: 9244106b334ef54ba3e39a3f2c0c76f46ae4ecd3
          Fixed in 1.3: fe1316b335cb970b7b721359d8a69e12fef700ba

          Show
          twalthr Timo Walther added a comment - Fixed in 1.4: 9244106b334ef54ba3e39a3f2c0c76f46ae4ecd3 Fixed in 1.3: fe1316b335cb970b7b721359d8a69e12fef700ba

            People

            • Assignee:
              twalthr Timo Walther
              Reporter:
              twalthr Timo Walther
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development