You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Jason Dere <jd...@hortonworks.com> on 2014/09/09 20:23:27 UTC

Re: Review Request 23352: Support non-constant expressions for MAP type indices.

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



ql/src/java/org/apache/hadoop/hive/ql/parse/TypeCheckProcFactory.java
<https://reviews.apache.org/r/23352/#comment91752>

    I think you can use FunctionRegistry.implicitConvertable() here rather than having to create a new method.



ql/src/java/org/apache/hadoop/hive/ql/parse/TypeCheckProcFactory.java
<https://reviews.apache.org/r/23352/#comment91809>

    could we also use implicitConvertable() here?


- Jason Dere


On July 9, 2014, 6:57 a.m., Navis Ryu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23352/
> -----------------------------------------------------------
> 
> (Updated July 9, 2014, 6:57 a.m.)
> 
> 
> 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
> 
>


Re: Review Request 23352: Support non-constant expressions for MAP type indices.

Posted by Navis Ryu <na...@nexr.com>.

> On Sept. 9, 2014, 6:23 p.m., Jason Dere wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/parse/TypeCheckProcFactory.java, line 768
> > <https://reviews.apache.org/r/23352/diff/1/?file=626518#file626518line768>
> >
> >     could we also use implicitConvertable() here?

Will introduce more work to be done in index udf. I'll update that.


- Navis


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


On July 9, 2014, 6:57 a.m., Navis Ryu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23352/
> -----------------------------------------------------------
> 
> (Updated July 9, 2014, 6:57 a.m.)
> 
> 
> 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
> 
>