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

Support non-constant expressions for ARRAY/MAP type indices.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.13.1
    • Fix Version/s: 0.14.0
    • Component/s: None
    • Labels:
      None
    • Release Note:
      Supports negative and non-constant expressions for ARRAY/MAP type indices.

      Description

      Here is my sample:

      CREATE TABLE RECORD(RecordID string, BatchDate string, Country string) 
      STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' 
      WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,D:BatchDate,D:Country") 
      TBLPROPERTIES ("hbase.table.name" = "RECORD"); 
      
      
      CREATE TABLE KEY_RECORD(KeyValue String, RecordId map<string,string>) 
      STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' 
      WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key, K:") 
      TBLPROPERTIES ("hbase.table.name" = "KEY_RECORD"); 
      

      The following join statement doesn't work.

      SELECT a.*, b.* from KEY_RECORD a join RECORD b 
      WHERE a.RecordId[b.RecordID] is not null;
      

      FAILED: SemanticException 2:16 Non-constant expression for map indexes not supported. Error encountered near token 'RecordID'

        Attachments

        1. HIVE-7325.1.patch.txt
          11 kB
          Navis
        2. HIVE-7325.2.patch.txt
          12 kB
          Navis
        3. HIVE-7325.3.patch.txt
          19 kB
          Navis
        4. HIVE-7325.4.patch.txt
          20 kB
          Navis

          Issue Links

            Activity

              People

              • Assignee:
                navis Navis
                Reporter:
                mkempanna Mala Chikka Kempanna
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: