Uploaded image for project: 'Tajo'
  1. Tajo
  2. TAJO-1386

CURRENT_DATE generates parsing errors sometimes.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.11.0, 0.10.1
    • Component/s: SQL Parser
    • Labels:
      None
    • Environment:

      Tajo 0.11.0-SNAPSHOT

      Description

      `current_date` works differently from other functions that returns DATE type.

      default> select cast('2015-03-10' as date)+1;
      ?plus
      -------------------------------
      2015-03-11
      (1 rows, 0.008 sec, 0 B selected)

      default> select TO_DATE('2015-03-10','YYYY-MM-DD')+1;
      ?plus
      -------------------------------
      2015-03-11
      (1 rows, 0.013 sec, 0 B selected)

      default> select current_date()+1;
      ERROR: mismatched input '+' expecting

      {<EOF>, EXCEPT, FROM, INTERSECT, UNION, ';', ','}

        Activity

        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Tajo-master-CODEGEN-build #245 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/245/)
        TAJO-1386: CURRENT_DATE generates parsing errors sometimes. (hyunsik: rev 3b9a2e5f287db3fcfdf6b0578c8184c47b8b3ebd)

        • tajo-core/src/main/java/org/apache/tajo/engine/parser/SQLSyntaxError.java
        • tajo-core/src/main/antlr4/org/apache/tajo/engine/parser/SQLParser.g4
        • tajo-plan/src/main/java/org/apache/tajo/plan/InvalidQueryException.java
        • tajo-core/src/main/java/org/apache/tajo/engine/parser/SQLAnalyzer.java
        • CHANGES
        • tajo-core/src/test/java/org/apache/tajo/engine/function/TestDateTimeFunctions.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Tajo-master-CODEGEN-build #245 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/245/ ) TAJO-1386 : CURRENT_DATE generates parsing errors sometimes. (hyunsik: rev 3b9a2e5f287db3fcfdf6b0578c8184c47b8b3ebd) tajo-core/src/main/java/org/apache/tajo/engine/parser/SQLSyntaxError.java tajo-core/src/main/antlr4/org/apache/tajo/engine/parser/SQLParser.g4 tajo-plan/src/main/java/org/apache/tajo/plan/InvalidQueryException.java tajo-core/src/main/java/org/apache/tajo/engine/parser/SQLAnalyzer.java CHANGES tajo-core/src/test/java/org/apache/tajo/engine/function/TestDateTimeFunctions.java
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #607 (See https://builds.apache.org/job/Tajo-master-build/607/)
        TAJO-1386: CURRENT_DATE generates parsing errors sometimes. (hyunsik: rev 3b9a2e5f287db3fcfdf6b0578c8184c47b8b3ebd)

        • tajo-core/src/main/java/org/apache/tajo/engine/parser/SQLAnalyzer.java
        • CHANGES
        • tajo-core/src/test/java/org/apache/tajo/engine/function/TestDateTimeFunctions.java
        • tajo-core/src/main/antlr4/org/apache/tajo/engine/parser/SQLParser.g4
        • tajo-plan/src/main/java/org/apache/tajo/plan/InvalidQueryException.java
        • tajo-core/src/main/java/org/apache/tajo/engine/parser/SQLSyntaxError.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #607 (See https://builds.apache.org/job/Tajo-master-build/607/ ) TAJO-1386 : CURRENT_DATE generates parsing errors sometimes. (hyunsik: rev 3b9a2e5f287db3fcfdf6b0578c8184c47b8b3ebd) tajo-core/src/main/java/org/apache/tajo/engine/parser/SQLAnalyzer.java CHANGES tajo-core/src/test/java/org/apache/tajo/engine/function/TestDateTimeFunctions.java tajo-core/src/main/antlr4/org/apache/tajo/engine/parser/SQLParser.g4 tajo-plan/src/main/java/org/apache/tajo/plan/InvalidQueryException.java tajo-core/src/main/java/org/apache/tajo/engine/parser/SQLSyntaxError.java
        Hide
        hyunsik Hyunsik Choi added a comment -

        committed. Thank you for your contribution.

        Show
        hyunsik Hyunsik Choi added a comment - committed. Thank you for your contribution.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

        https://github.com/apache/tajo/pull/408

        Show
        githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/tajo/pull/408
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user hyunsik commented on the pull request:

        https://github.com/apache/tajo/pull/408#issuecomment-78149051

        +1
        I manually verified the patch. It passes 'mvn clean install'.

        Show
        githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/408#issuecomment-78149051 +1 I manually verified the patch. It passes 'mvn clean install'.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user hyunsik commented on the pull request:

        https://github.com/apache/tajo/pull/408#issuecomment-78130140

        The patch looks good to me. Thank you Dongjoon for your review.

        It should have to be done. If the unit tests are passed, I'll commit it shortly.

        Show
        githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/408#issuecomment-78130140 The patch looks good to me. Thank you Dongjoon for your review. It should have to be done. If the unit tests are passed, I'll commit it shortly.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user dongjoon-hyun commented on the pull request:

        https://github.com/apache/tajo/pull/408#issuecomment-78041209

        +1. Great @navis . It solves my problems.

        Show
        githubbot ASF GitHub Bot added a comment - Github user dongjoon-hyun commented on the pull request: https://github.com/apache/tajo/pull/408#issuecomment-78041209 +1. Great @navis . It solves my problems.
        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user navis opened a pull request:

        https://github.com/apache/tajo/pull/408

        TAJO-1386 CURRENT_DATE generates parsing errors sometimes

        added datetime_value_function to numeric_value_function

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

        $ git pull https://github.com/navis/tajo TAJO-1386

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

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


        commit b8d02d216758673a478e43579ce3402046301aa0
        Author: navis.ryu <navis@apache.org>
        Date: 2015-03-10T11:32:26Z

        TAJO-1386 CURRENT_DATE generates parsing errors sometimes


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user navis opened a pull request: https://github.com/apache/tajo/pull/408 TAJO-1386 CURRENT_DATE generates parsing errors sometimes added datetime_value_function to numeric_value_function You can merge this pull request into a Git repository by running: $ git pull https://github.com/navis/tajo TAJO-1386 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tajo/pull/408.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 #408 commit b8d02d216758673a478e43579ce3402046301aa0 Author: navis.ryu <navis@apache.org> Date: 2015-03-10T11:32:26Z TAJO-1386 CURRENT_DATE generates parsing errors sometimes

          People

          • Assignee:
            navis Navis
            Reporter:
            dongjoon Dongjoon Hyun
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development