hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Navis Ryu" <navis....@nexr.com>
Subject Review Request 23352: Support non-constant expressions for MAP type indices.
Date Wed, 09 Jul 2014 06:57:46 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23352/
-----------------------------------------------------------

Review request for hive.


Bugs: HIVE-7325
    https://issues.apache.org/jira/browse/HIVE-7325


Repository: hive-git


Description
-------

Here is my sample:
{code}
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"); 
{code}
The following join statement doesn't work. 
{code}
SELECT a.*, b.* from KEY_RECORD a join RECORD b 
WHERE a.RecordId[b.RecordID] is not null;
{code}
FAILED: SemanticException 2:16 Non-constant expression for map indexes not supported. Error
encountered near token 'RecordID' 


Diffs
-----

  ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java 9889cfe 
  ql/src/java/org/apache/hadoop/hive/ql/parse/TypeCheckProcFactory.java e44f5ae 
  ql/src/test/queries/clientpositive/array_map_access_nonconstant.q PRE-CREATION 
  ql/src/test/queries/negative/invalid_list_index.q c40f079 
  ql/src/test/queries/negative/invalid_list_index2.q 99d0b3d 
  ql/src/test/queries/negative/invalid_map_index2.q 5828f07 
  ql/src/test/results/clientpositive/array_map_access_nonconstant.q.out PRE-CREATION 
  ql/src/test/results/compiler/errors/invalid_list_index.q.out a4179cd 
  ql/src/test/results/compiler/errors/invalid_list_index2.q.out aaa9455 
  ql/src/test/results/compiler/errors/invalid_map_index2.q.out edc9bda 
  serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/PrimitiveObjectInspectorUtils.java
5ccacf1 

Diff: https://reviews.apache.org/r/23352/diff/


Testing
-------


Thanks,

Navis Ryu


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message