Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
0.13.0, 0.14.0
-
None
-
None
Description
I have a table like this ...
create table lineitem_orc_cg ( CG1 STRUCT<L_PARTKEY:INT, L_SUPPKEY:INT, L_COMMITDATE:STRING, L_RECEIPTDATE:STRING, L_SHIPINSTRUCT:STRING, L_SHIPMODE:STRING, L_COMMENT:STRING, L_TAX:float, L_RETURNFLAG:STRING, L_LINESTATUS:STRING, L_LINENUMBER:INT, L_ORDERKEY:INT>, CG2 STRUCT<L_QUANTITY:float, L_EXTENDEDPRICE:float, L_DISCOUNT:float, L_SHIPDATE:STRING> ) row format serde 'org.apache.hadoop.hive.ql.io.orc.OrcSerde' stored as orc tblproperties ("orc.compress"="NONE");
When I want to select a field from a struct by using
select cg1.l_comment from lineitem_orc_cg limit 1;
I got
Caused by: java.lang.NullPointerException at org.apache.hadoop.hive.ql.exec.ExprNodeFieldEvaluator.initialize(ExprNodeFieldEvaluator.java:61) at org.apache.hadoop.hive.ql.exec.Operator.initEvaluators(Operator.java:928) at org.apache.hadoop.hive.ql.exec.Operator.initEvaluatorsAndReturnStruct(Operator.java:954) at org.apache.hadoop.hive.ql.exec.SelectOperator.initializeOp(SelectOperator.java:65) at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:375) at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:459) at org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:415) at org.apache.hadoop.hive.ql.exec.TableScanOperator.initializeOp(TableScanOperator.java:189) at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:375) at org.apache.hadoop.hive.ql.exec.MapOperator.initializeOp(MapOperator.java:409) at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:375) at org.apache.hadoop.hive.ql.exec.mr.ExecMapper.configure(ExecMapper.java:133) ... 22 more
Attachments
Issue Links
- duplicates
-
HIVE-6716 ORC struct throws NPE for tables with inner structs having null values
- Resolved