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

Postgres schema not using quoted identifiers for certain tables

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0.0
    • 4.0.0-alpha-1
    • Database/Schema
    • None

    Description

      In the latest postgresql schema (standalone-metastore/metastore-server/src/main/sql/postgres/hive-schema-4.0.0.postgres.sql) the following tables have lowercase table and column names:

      aux_table 
      compaction_queue 
      completed_compactions 
      completed_txn_components 
      hive_locks 
      materialization_rebuild_locks 
      min_history_level 
      next_compaction_queue_id 
      next_lock_id 
      next_txn_id 
      next_write_id 
      repl_txn_map 
      runtime_stats 
      txn_components 
      txn_to_write_id 
      txns 
      write_set

      As these tables are referenced from the Hive sys database, the queries to these tables will fail with a "Table not found" error.

      The problem is that the table and column names are not enclosed in quotes, so postgres will turn these identifiers into lowercase.

       

      Attachments

        1. HIVE-22546.2.patch
          35 kB
          Zoltan Chovan
        2. HIVE-22546.3.patch
          35 kB
          Zoltan Chovan
        3. HIVE-22546.3.patch
          35 kB
          Zoltan Chovan
        4. HIVE-22546.4.patch
          35 kB
          Zoltan Chovan
        5. HIVE-22546.5.patch
          22 kB
          Zoltan Chovan
        6. HIVE-22546.6.patch
          22 kB
          Zoltan Chovan
        7. HIVE-22546.patch
          21 kB
          Zoltan Chovan

        Activity

          People

            zchovan Zoltan Chovan
            zchovan Zoltan Chovan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: