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

Simplify CREATE table statements with Kudu tables

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: Impala 2.6.0
    • Fix Version/s: Impala 2.8.0
    • Component/s: Frontend
    • Labels:
    • Docs Text:
      Hide
      Syntax:
      - CREATE TABLE [IF NOT EXISTS] tbl_name (col_spec [,... col_spec] [, PRIMARY KEY (col_name [,... col_name]) PARTITION BY partition_spec stored as kudu tblproperties(...)
      col_spec: col_name col_type [... col_option]
      col_option: PRIMARY KEY | ENCODING enc_value | COMPRESSION comp_alg_name | DEFAULT value | BLOCK_SIZE int_value | [NOT] NULL
      partition_spec: range_part_spec | hash_part_spec
      range_part_spec: RANGE BY (col_name [,... col_name]) (range_partition [,...range_partition])
      range_partition: PARTITION [lower_val <[=]] VALUES [upper_val <[=]] | PARTITION VALUE = (val_1 [,... val_n])
      hash_partition_spec: HASH (col_name [,.. col_name]) PARTITIONS int_val

      - CREATE EXTERNAL TABLE [IF NOT EXISTS] tbl_name STORED AS KUDU TBLPROPERTIES('kudu.table_name'='kudu_tbl_name')

      - CREATE TABLE tbl_name PRIMARY KEY (col_name [,...col_name]) partition_spec AS select_stmt

      - CREATE TABLE LIKE is not supported for Kudu tables
      Show
      Syntax: - CREATE TABLE [IF NOT EXISTS] tbl_name (col_spec [,... col_spec] [, PRIMARY KEY (col_name [,... col_name]) PARTITION BY partition_spec stored as kudu tblproperties(...) col_spec: col_name col_type [... col_option] col_option: PRIMARY KEY | ENCODING enc_value | COMPRESSION comp_alg_name | DEFAULT value | BLOCK_SIZE int_value | [NOT] NULL partition_spec: range_part_spec | hash_part_spec range_part_spec: RANGE BY (col_name [,... col_name]) (range_partition [,...range_partition]) range_partition: PARTITION [lower_val <[=]] VALUES [upper_val <[=]] | PARTITION VALUE = (val_1 [,... val_n]) hash_partition_spec: HASH (col_name [,.. col_name]) PARTITIONS int_val - CREATE EXTERNAL TABLE [IF NOT EXISTS] tbl_name STORED AS KUDU TBLPROPERTIES('kudu.table_name'='kudu_tbl_name') - CREATE TABLE tbl_name PRIMARY KEY (col_name [,...col_name]) partition_spec AS select_stmt - CREATE TABLE LIKE is not supported for Kudu tables
    • Target Version:

      Description

      Umbrella JIRA for a number of tasks related to simplifying the CREATE TABLE statements for Kudu tables.

        Activity

        Hide
        dtsirogiannis Dimitris Tsirogiannis added a comment -

        Change-Id: I7b9d51b2720ab57649abdb7d5c710ea04ff50dc1
        Reviewed-on: http://gerrit.cloudera.org:8080/4414
        Reviewed-by: Alex Behm <alex.behm@cloudera.com>
        Tested-by: Internal Jenkins

        Show
        dtsirogiannis Dimitris Tsirogiannis added a comment - Change-Id: I7b9d51b2720ab57649abdb7d5c710ea04ff50dc1 Reviewed-on: http://gerrit.cloudera.org:8080/4414 Reviewed-by: Alex Behm <alex.behm@cloudera.com> Tested-by: Internal Jenkins
        Hide
        johan.ahlen_impala_ae37 Johan Åhlén added a comment -

        I'm in the process of updating the Hue autocompleter and noticed some differences between the docs syntax here and the Impala parser + tests. Please correct me if I'm wrong with assuming that:

        • There shouldn't be a "BY" in the range_part_spec above
        • The "PARTITION BY partition_spec" and "tblproperties(...)" are optional
        • "PARTITION BY" and "PARTITIONED BY" are interchangeable in any CREATE TABLE statement
        • The order of the col_options doesn't matter but each can only appear once
        • COMMENT can still be added to columns, partitions and the table
        • For columns the COMMENT is part of col_options
        • All keywords are reserved except for the ones in col_option (minus COMMENT, NOT and NULL).
        • For the syntax example in the review description, "DISTRIBUTE BY" is supposed to be "PARTITION BY"
        • The "SPLIT ROWS" part in the review is not implemented (can't seem to find it in the parser and tests)
        Show
        johan.ahlen_impala_ae37 Johan Åhlén added a comment - I'm in the process of updating the Hue autocompleter and noticed some differences between the docs syntax here and the Impala parser + tests. Please correct me if I'm wrong with assuming that: There shouldn't be a "BY" in the range_part_spec above The "PARTITION BY partition_spec" and "tblproperties(...)" are optional "PARTITION BY" and "PARTITIONED BY" are interchangeable in any CREATE TABLE statement The order of the col_options doesn't matter but each can only appear once COMMENT can still be added to columns, partitions and the table For columns the COMMENT is part of col_options All keywords are reserved except for the ones in col_option (minus COMMENT, NOT and NULL). For the syntax example in the review description, "DISTRIBUTE BY" is supposed to be "PARTITION BY" The "SPLIT ROWS" part in the review is not implemented (can't seem to find it in the parser and tests)

          People

          • Assignee:
            dtsirogiannis Dimitris Tsirogiannis
            Reporter:
            dtsirogiannis Dimitris Tsirogiannis
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development