Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-5348

remove mention of stringized timestamp literals with interval expressions

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Impala 2.9.0
    • Fix Version/s: Impala 2.9.0
    • Component/s: Docs
    • Labels:
      None

      Description

      http://impala.apache.org/docs/build/html/topics/impala_literals.html mentions being able to apply INTERVAL expressions to strings that will be able to be coerced as timestamps,

      You can also use INTERVAL expressions to add or subtract from timestamp literal values, such as '1966-07-30' + INTERVAL 5 YEARS + INTERVAL 3 DAYS.

      but a user pointed out on dev@ that this is wrong:

      [localhost:21000] > SELECT '1966-07-30' + INTERVAL 1 YEAR;
      ERROR: AnalysisException: Operand ''1966-07-30'' of timestamp arithmetic expression ''1966-07-30' + INTERVAL 1 YEAR' returns type 'STRING'. Expected type 'TIMESTAMP'.
      
      [localhost:21000] >
      

      Documentation should be altered to fix this.

      It looks like John Russell pointed this out in IMPALA-2293, which was marked as a dupe of IMPALA-1503.

        Attachments

          Activity

            People

            • Assignee:
              jrussell John Russell
              Reporter:
              mikeb Michael Brown
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: