You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by se...@apache.org on 2017/02/02 02:03:33 UTC
[34/50] [abbrv] hive git commit: HIVE-15649 : LLAP IO may NPE on
all-column read (Sergey Shelukhin, reviewed by Prasanth Jayachandran) ADDENDUM
HIVE-15649 : LLAP IO may NPE on all-column read (Sergey Shelukhin, reviewed by Prasanth Jayachandran) ADDENDUM
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/43e04976
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/43e04976
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/43e04976
Branch: refs/heads/hive-14535
Commit: 43e0497677a55f18fbf8bd3ba9ea41b87fcdb033
Parents: 06b2b0e
Author: Sergey Shelukhin <se...@apache.org>
Authored: Wed Feb 1 12:30:20 2017 -0800
Committer: Sergey Shelukhin <se...@apache.org>
Committed: Wed Feb 1 12:30:20 2017 -0800
----------------------------------------------------------------------
.../hive/llap/io/api/impl/LlapRecordReader.java | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/43e04976/llap-server/src/java/org/apache/hadoop/hive/llap/io/api/impl/LlapRecordReader.java
----------------------------------------------------------------------
diff --git a/llap-server/src/java/org/apache/hadoop/hive/llap/io/api/impl/LlapRecordReader.java b/llap-server/src/java/org/apache/hadoop/hive/llap/io/api/impl/LlapRecordReader.java
index 2f79828..9ef9ca4 100644
--- a/llap-server/src/java/org/apache/hadoop/hive/llap/io/api/impl/LlapRecordReader.java
+++ b/llap-server/src/java/org/apache/hadoop/hive/llap/io/api/impl/LlapRecordReader.java
@@ -18,6 +18,8 @@
package org.apache.hadoop.hive.llap.io.api.impl;
+import java.util.ArrayList;
+
import java.io.IOException;
import java.util.LinkedList;
import java.util.List;
@@ -98,7 +100,6 @@ class LlapRecordReader
this.executor = executor;
this.jobConf = job;
this.split = split;
- this.columnIds = includedCols;
this.sarg = ConvertAstToSearchArg.createFromConf(job);
this.columnNames = ColumnProjectionUtils.getReadColumnNames(job);
final String fragmentId = LlapTezUtils.getFragmentId(job);
@@ -122,12 +123,13 @@ class LlapRecordReader
rbCtx = ctx != null ? ctx : LlapInputFormat.createFakeVrbCtx(mapWork);
if (includedCols == null) {
// Assume including everything means the VRB will have everything.
- this.columnCount = rbCtx.getRowColumnTypeInfos().length;
- } else {
- this.columnCount = columnIds.size();
+ includedCols = new ArrayList<>(rbCtx.getRowColumnTypeInfos().length);
+ for (int i = 0; i < rbCtx.getRowColumnTypeInfos().length; ++i) {
+ includedCols.add(i);
+ }
}
-
-
+ this.columnIds = includedCols;
+ this.columnCount = columnIds.size();
int partitionColumnCount = rbCtx.getPartitionColumnCount();
if (partitionColumnCount > 0) {
@@ -169,8 +171,7 @@ class LlapRecordReader
SchemaEvolution schemaEvolution = new SchemaEvolution(
fileSchema, rp.getReaderSchema(), includedColumns);
for (int i = 0; i < columnCount; ++i) {
- int colId = columnIds == null ? i : columnIds.get(i);
- if (!schemaEvolution.isPPDSafeConversion(colId)) {
+ if (!schemaEvolution.isPPDSafeConversion(columnIds.get(i))) {
LlapIoImpl.LOG.warn("Unsupported schema evolution! Disabling Llap IO for {}", split);
return false;
}
@@ -214,7 +215,7 @@ class LlapRecordReader
// VRB was created from VrbCtx, so we already have pre-allocated column vectors
for (int i = 0; i < cvb.cols.length; ++i) {
// Return old CVs (if any) to caller. We assume these things all have the same schema.
- cvb.swapColumnVector(i, value.cols, columnIds == null ? i : columnIds.get(i));
+ cvb.swapColumnVector(i, value.cols, columnIds.get(i));
}
value.selectedInUse = false;
value.size = cvb.size;