diff options
author | Bohdan Kazydub <bohdan.kazydub@gmail.com> | 2018-05-21 19:11:23 +0300 |
---|---|---|
committer | Aman Sinha <asinha@maprtech.com> | 2018-10-14 10:11:05 -0700 |
commit | 0a3cfdebd25ea4186c2a2b75524c34323984ffca (patch) | |
tree | a00018c85f6ee1a892d9ba6b6052b90a62cabe61 /contrib | |
parent | 734c46076b5df42be93aece1a363438d5c2a3e95 (diff) |
DRILL-6473: Update MapR Hive
close apache/drill#1307
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/readers/HiveAbstractReader.java | 19 | ||||
-rw-r--r-- | contrib/storage-hive/hive-exec-shade/pom.xml | 3 |
2 files changed, 8 insertions, 14 deletions
diff --git a/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/readers/HiveAbstractReader.java b/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/readers/HiveAbstractReader.java index ba1cd30b5..5ed6c3bb7 100644 --- a/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/readers/HiveAbstractReader.java +++ b/contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/readers/HiveAbstractReader.java @@ -25,6 +25,7 @@ import java.util.List; import java.util.Properties; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; +import java.util.stream.Collectors; import org.apache.drill.shaded.guava.com.google.common.util.concurrent.ListenableFuture; import io.netty.buffer.DrillBuf; @@ -203,20 +204,10 @@ public abstract class HiveAbstractReader extends AbstractRecordReader { } } } - ColumnProjectionUtils.appendReadColumns(job, columnIds); - - // TODO: Use below overloaded method instead of above simpler version of it, once Hive client dependencies - // (from all profiles) will be updated to 2.3 version or above -// ColumnProjectionUtils.appendReadColumns(job, columnIds, selectedColumnNames, -// Lists.newArrayList(Iterables.transform(getColumns(), new Function<SchemaPath, String>() -// { -// @Nullable -// @Override -// public String apply(@Nullable SchemaPath path) -// { -// return path.getRootSegmentPath(); -// } -// }))); + List<String> paths = getColumns().stream() + .map(SchemaPath::getRootSegmentPath) + .collect(Collectors.toList()); + ColumnProjectionUtils.appendReadColumns(job, columnIds, selectedColumnNames, paths); for (String columnName : selectedColumnNames) { StructField fieldRef = finalOI.getStructFieldRef(columnName); diff --git a/contrib/storage-hive/hive-exec-shade/pom.xml b/contrib/storage-hive/hive-exec-shade/pom.xml index 3ef1839a9..b85775848 100644 --- a/contrib/storage-hive/hive-exec-shade/pom.xml +++ b/contrib/storage-hive/hive-exec-shade/pom.xml @@ -139,6 +139,9 @@ <filter> <artifact>org.apache.hive:hive-exec</artifact> <excludes> + <!-- This exclusion can be removed once hive-exec uses parquet-hadoop-bundle 1.8.2 or higher. + It can be so, for example, after upgrading Hive to 3.0. To check if it's safe to remove the exclusion + you can use TestHiveStorage.readFromAlteredPartitionedTableWithEmptyGroupType() test case. --> <exclude>org/apache/parquet/schema/*</exclude> </excludes> </filter> |