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

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

Log workAgile BoardRank to TopRank to BottomVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.13.1
    • 0.14.0
    • None
    • None
    • 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 Ryu
        2. HIVE-7325.2.patch.txt
          12 kB
          Navis Ryu
        3. HIVE-7325.3.patch.txt
          19 kB
          Navis Ryu
        4. HIVE-7325.4.patch.txt
          20 kB
          Navis Ryu

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            navis Navis Ryu Assign to me
            mkempanna Mala Chikka Kempanna
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Issue deployment