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

Databases named "iceberg" confuses the parser, throws ParseException

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • Impala 4.3.0
    • None
    • ghx-label-9

    Description

      Impala can't create a database named "iceberg" but hive can. Valid queries fails in impala using that database.

      [localhost:21050] default> create database iceberg;
      Query: create database iceberg
      ERROR: ParseException: Syntax error in line 1:
      create database iceberg
                      ^
      Encountered: ICEBERG
      Expected: DEFAULT, EXTENDED, FORMATTED, IF, IDENTIFIER 

      Created database in hive.

      [localhost:21050] default> use iceberg;
      Query: use iceberg
      ERROR: ParseException: Syntax error in line 1: use iceberg   
        ^
      Encountered: ICEBERG
      Expected: DEFAULT, IDENTIFIER CAUSED BY: Exception: Syntax error
       

      Selects fails too on existing tables.

      Escaping solves the issue, e.g.:

      CREATE TABLE `iceberg`.`ice_9c` (i INT, t TIMESTAMP) PARTITIONED BY (j BIGINT) STORED AS ICEBERG TBLPROPERTIES ('format-version' = '2');

      Improving exception message could help the users in the future

      Attachments

        Activity

          People

            gfurnstahl Gergely Fürnstáhl
            gfurnstahl Gergely Fürnstáhl
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: