Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-4928

Date literals do not work properly in partition spec clause

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.12.0
    • Query Processor
    • None

    Description

      The partition spec parsing doesn't do any actual real evaluation of the values in the partition spec, instead just taking the text value of the ASTNode representing the partition value. This works fine for string/numeric literals (expression tree below):

      (TOK_PARTVAL region 99)

      But not for Date literals which are of form DATE 'yyyy-mm-dd' (expression tree below:

      (TOK_DATELITERAL '1999-12-31')

      In this case the parser/analyzer uses "TOK_DATELITERAL" as the partition column value, when it should really get value of the child of the DATELITERAL token.

      Attachments

        1. HIVE-4928.1.patch.txt
          48 kB
          Jason Dere
        2. HIVE-4928.D11871.1.patch
          48 kB
          Phabricator

        Issue Links

          Activity

            People

              jdere Jason Dere
              jdere Jason Dere
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: