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

Database prefix does not always work properly if table with has same name

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • Catalog
    • None

    Description

      In the case where a table with an unsupported Hive SerDe shares a name with it's database, any operations on any table in the database will fail when using the qualified name (database.table), possibility with an ambiguity between database.table and table.column paths.
      Reproduction steps:

      In Hive:

      create database test1;
      use test1;
      add jar hdfs://nameservice1/tmp/hive-hcatalog-core-1.1.0-cdh5.11.0.jar;
      CREATE TABLE test1 (a string )   ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe';
      create table test2 (b string) stored as parquet;
      

      In Impala:

      [host:21000] > invalidate metadata;
      [host:21000] > use test1;
      [host:21000] > show tables;
      +-------+
      | name  |
      +-------+
      | test1 |
      | test2 |
      +-------+
      
      [host:21000] > desc test2;
      Query: describe test2
      +------+--------+---------+
      | name | type   | comment |
      +------+--------+---------+
      | b    | string |         |
      +------+--------+---------+
      
      [host:21000] > desc test1;
      ERROR: AnalysisException: Failed to load metadata for table: test1
      CAUSED BY: InvalidStorageDescriptorException: Impala does not support tables of this type. REASON: SerDe library 'org.apache.hive.hcatalog.data.JsonSerDe' is not supported.
      CAUSED BY: TableLoadingException: Failed to load metadata for table: test1
      CAUSED BY: InvalidStorageDescriptorException: Impala does not support tables of this type. REASON: SerDe library 'org.apache.hive.hcatalog.data.JsonSerDe' is not supported.
      
      [host:21000] > desc test1.test2;
      Query: describe test1.test2
      ERROR: AnalysisException: Failed to load metadata for table: test1
      CAUSED BY: InvalidStorageDescriptorException: Impala does not support tables of this type. REASON: SerDe library 'org.apache.hive.hcatalog.data.JsonSerDe' is not supported.
      CAUSED BY: TableLoadingException: Failed to load metadata for table: test1
      CAUSED BY: InvalidStorageDescriptorException: Impala does not support tables of this type. REASON: SerDe library 'org.apache.hive.hcatalog.data.JsonSerDe' is not supported.
      
      [host:21000] > select * from test1.test2;
      Query: select * from test1.test2
      Query submitted at: 2017-08-16 08:15:44 (Coordinator: http://host:25000)
      ERROR: AnalysisException: Failed to load metadata for table: 'test1.test2'
      CAUSED BY: TableLoadingException: Failed to load metadata for table: test1
      CAUSED BY: InvalidStorageDescriptorException: Impala does not support tables of this type. REASON: SerDe library 'org.apache.hive.hcatalog.data.JsonSerDe' is not supported.
      

      Note, this issue does not occur if using a different database when doing the qualified call

      [host:21000] > use default;
      [host:21000] > desc test1.test2;
      +------+--------+---------+
      | name | type   | comment |
      +------+--------+---------+
      | b    | string |         |
      +------+--------+---------+
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jphelps Jason Phelps
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: