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

Create Kudu table syntax does not allow multi-column range partitions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Impala 2.11.0
    • Impala 2.13.0, Impala 3.1.0
    • Frontend
    • None
    • ghx-label-4

    Description

      The Impala CREATE TABLE syntax guide includes this bit of grammar in the Kudu partitioning section:

      range_clause ::=
        RANGE [ (pk_col [, ...]) ]
        (
          {
            PARTITION constant_expression range_comparison_operator VALUES range_comparison_operator constant_expression
            | PARTITION VALUE = constant_expression_or_tuple
          }
         [, ...]
        )

      This is suspicious because constant_expression is used in the range clause, and constant_expression_or_tuple is used in the single-value clause.  I believe both should allow for tuples.

      In other words, today a CREATE TABLE statement such as

      CREATE TABLE t (a BIGINT, b BIGINT, PRIMARY KEY (a, b))
      PARTITION BY RANGE (a, b) (
          PARTITION (0, 0) <= VALUES < (10, 0)
      ) STORED AS KUDU;

      results in a syntax error, and it should not.  CC twmarshall

      Attachments

        Activity

          People

            twmarshall Thomas Tauber-Marshall
            danburkert Dan Burkert
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: