You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Amruth S (JIRA)" <ji...@apache.org> on 2018/05/07 07:58:00 UTC
[jira] [Commented] (HIVE-18593) NPE on vectorization group by
[ https://issues.apache.org/jira/browse/HIVE-18593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16465583#comment-16465583 ]
Amruth S commented on HIVE-18593:
---------------------------------
This might be fixed by HIVE-18622. Will check and revert.
> NPE on vectorization group by
> -----------------------------
>
> Key: HIVE-18593
> URL: https://issues.apache.org/jira/browse/HIVE-18593
> Project: Hive
> Issue Type: Bug
> Components: Hive, HiveServer2
> Affects Versions: 2.3.2
> Reporter: Amruth S
> Priority: Major
>
> Vectorisation with some queries seem to be failing with null pointer exceptions. This happens only with 2.3.2 release and not the older ones.
> In the case, (in BytesColumnVector.java, vector[0] is null, isRepeating is true, length[0] is 0, start[0] is 0
> {code:java}
> public void copySelected(
> boolean selectedInUse, int[] sel, int size, BytesColumnVector output) {
> // Output has nulls if and only if input has nulls.
> output.noNulls = noNulls;
> output.isRepeating = false;
> // Handle repeating case
> if (isRepeating) {
> output.setVal(0, vector[0], start[0], length[0]);
> output.isNull[0] = isNull[0];
> output.isRepeating = true;
> return;
> }
> {code}
> Exception trace below
> {code:java}
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
> at org.apache.hadoop.hive.ql.exec.vector.VectorMapOperator.process(VectorMapOperator.java:883)
> at org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:86)
> ... 17 more
> Caused by: java.lang.NullPointerException
> at java.lang.System.arraycopy(Native Method)
> at org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector.setVal(BytesColumnVector.java:173)
> at org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector.copySelected(BytesColumnVector.java:321)
> at org.apache.hadoop.hive.ql.exec.vector.expressions.IfExprStringGroupColumnStringGroupColumn.evaluate(IfExprStringGroupColumnStringGroupColumn.java:85)
> at org.apache.hadoop.hive.ql.exec.vector.expressions.aggregates.gen.VectorUDAFMaxString.aggregateInputSelection(VectorUDAFMaxString.java:135)
> at org.apache.hadoop.hive.ql.exec.vector.VectorGroupByOperator$ProcessingModeBase.processAggregators(VectorGroupByOperator.java:218)
> at org.apache.hadoop.hive.ql.exec.vector.VectorGroupByOperator$ProcessingModeHashAggregate.doProcessBatch(VectorGroupByOperator.java:408)
> at org.apache.hadoop.hive.ql.exec.vector.VectorGroupByOperator$ProcessingModeBase.processBatch(VectorGroupByOperator.java:179)
> at org.apache.hadoop.hive.ql.exec.vector.VectorGroupByOperator.process(VectorGroupByOperator.java:1021)
> at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:897)
> at org.apache.hadoop.hive.ql.exec.vector.VectorSelectOperator.process(VectorSelectOperator.java:137)
> at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:897)
> at org.apache.hadoop.hive.ql.exec.vector.VectorFilterOperator.process(VectorFilterOperator.java:123)
> at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:897)
> at org.apache.hadoop.hive.ql.exec.TableScanOperator.process(TableScanOperator.java:130)
> at org.apache.hadoop.hive.ql.exec.vector.VectorMapOperator.process(VectorMapOperator.java:783)
> ... 18 more
> {code}
>
> *Table details*
> {code:java}
> CREATE TABLE `test_table`(
> `a` string,
> `b` string,
> `c` string)
> ROW FORMAT SERDE
> 'org.apache.hadoop.hive.ql.io.orc.OrcSerde'
> STORED AS INPUTFORMAT
> 'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat'
> OUTPUTFORMAT
> 'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat'
> TBLPROPERTIES (
> 'orc.compress'='SNAPPY',
> 'orc.compress.size'='262144',
> 'orc.create.index'='true',
> 'orc.row.index.stride'='10000',
> 'orc.stripe.size'='268435456',
> 'transient_lastDdlTime'='1517556432');{code}
> *Query*
> {code:java}
> SELECT
> NVL(Max(CASE WHEN b IN ('some_literal') THEN b ELSE c END),'') AS scol
> FROM test_table
> GROUP BY a
> LIMIT 1000;{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)