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, ';', ','}

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: