HAWQ-931. CR Fixes. Take 2
Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/1094271b Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/1094271b Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/1094271b Branch: refs/heads/HAWQ-931 Commit: 1094271b66c89e9955c6a811fceee5fcc4bbb0e7 Parents: a086d4c Author: Shivram Mani <[email protected]> Authored: Fri Jul 29 17:09:10 2016 -0700 Committer: Shivram Mani <[email protected]> Committed: Tue Aug 2 15:12:58 2016 -0700 ---------------------------------------------------------------------- pxf/build.gradle | 1 - pxf/gradle.properties | 3 +-- .../apache/hawq/pxf/api/utilities/ColumnDescriptor.java | 8 ++++---- .../apache/hawq/pxf/plugins/hive/HiveORCAccessor.java | 12 +++--------- .../apache/hawq/pxf/service/utilities/ProtocolData.java | 2 +- 5 files changed, 9 insertions(+), 17 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/1094271b/pxf/build.gradle ---------------------------------------------------------------------- diff --git a/pxf/build.gradle b/pxf/build.gradle index cd29c01..23d688f 100644 --- a/pxf/build.gradle +++ b/pxf/build.gradle @@ -314,7 +314,6 @@ project('pxf-hive') { compile "org.apache.hive:hive-metastore:$hiveVersion" compile "org.apache.hive:hive-common:$hiveVersion" compile "org.apache.hive:hive-serde:$hiveVersion" - compile "org.apache.orc:orc-core:$orcVersion" testCompile 'pl.pragmatists:JUnitParams:1.0.2' configurations { // Remove hive-exec from unit tests as it causes VerifyError http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/1094271b/pxf/gradle.properties ---------------------------------------------------------------------- diff --git a/pxf/gradle.properties b/pxf/gradle.properties index a601936..6827b89 100644 --- a/pxf/gradle.properties +++ b/pxf/gradle.properties @@ -23,5 +23,4 @@ hiveVersion=1.2.1 hbaseVersionJar=1.1.2 hbaseVersionRPM=1.1.2 tomcatVersion=7.0.62 -pxfProtocolVersion=v14 -orcVersion=1.1.1 \ No newline at end of file +pxfProtocolVersion=v14 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/1094271b/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/utilities/ColumnDescriptor.java ---------------------------------------------------------------------- diff --git a/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/utilities/ColumnDescriptor.java b/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/utilities/ColumnDescriptor.java index 4b9dc9c..eaabfc9 100644 --- a/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/utilities/ColumnDescriptor.java +++ b/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/utilities/ColumnDescriptor.java @@ -117,9 +117,9 @@ public class ColumnDescriptor { @Override public String toString() { return "ColumnDescriptor [gpdbColumnTypeCode=" + gpdbColumnTypeCode - + ", gpdbColumnName=" + gpdbColumnName - + ", gpdbColumnTypeName=" + gpdbColumnTypeName - + ", gpdbColumnIndex=" + gpdbColumnIndex - + ", isProjected=" + isProjected + "]"; + + ", gpdbColumnName=" + gpdbColumnName + + ", gpdbColumnTypeName=" + gpdbColumnTypeName + + ", gpdbColumnIndex=" + gpdbColumnIndex + + ", isProjected=" + isProjected + "]"; } } http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/1094271b/pxf/pxf-hive/src/main/java/org/apache/hawq/pxf/plugins/hive/HiveORCAccessor.java ---------------------------------------------------------------------- diff --git a/pxf/pxf-hive/src/main/java/org/apache/hawq/pxf/plugins/hive/HiveORCAccessor.java b/pxf/pxf-hive/src/main/java/org/apache/hawq/pxf/plugins/hive/HiveORCAccessor.java index a3a0f5a..eb2d584 100644 --- a/pxf/pxf-hive/src/main/java/org/apache/hawq/pxf/plugins/hive/HiveORCAccessor.java +++ b/pxf/pxf-hive/src/main/java/org/apache/hawq/pxf/plugins/hive/HiveORCAccessor.java @@ -49,7 +49,7 @@ public class HiveORCAccessor extends HiveAccessor { private final String SARG_PUSHDOWN = "sarg.pushdown"; /** - * Constructs a HiveRCFileAccessor. + * Constructs a HiveORCFileAccessor. * * @param input input containing user data * @throws Exception if user data was wrong @@ -68,23 +68,17 @@ public class HiveORCAccessor extends HiveAccessor { return super.openForRead(); } - @Override - protected Object getReader(JobConf jobConf, InputSplit split) - throws IOException { - return inputFormat.getRecordReader(split, jobConf, Reporter.NULL); - } - /** * Adds the table tuple description to JobConf ojbect * so only these columns will be returned. */ private void addColumns() throws Exception { - List<String> colIds = new ArrayList<String>(); + List<Integer> colIds = new ArrayList<Integer>(); List<String> colNames = new ArrayList<String>(); for(ColumnDescriptor col: inputData.getTupleDescription()) { if(col.isProjected()) { - colIds.add(String.valueOf(col.columnIndex())); + colIds.add(col.columnIndex()); colNames.add(col.columnName()); } } http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/1094271b/pxf/pxf-service/src/main/java/org/apache/hawq/pxf/service/utilities/ProtocolData.java ---------------------------------------------------------------------- diff --git a/pxf/pxf-service/src/main/java/org/apache/hawq/pxf/service/utilities/ProtocolData.java b/pxf/pxf-service/src/main/java/org/apache/hawq/pxf/service/utilities/ProtocolData.java index f492378..98252dc 100644 --- a/pxf/pxf-service/src/main/java/org/apache/hawq/pxf/service/utilities/ProtocolData.java +++ b/pxf/pxf-service/src/main/java/org/apache/hawq/pxf/service/utilities/ProtocolData.java @@ -412,7 +412,7 @@ public class ProtocolData extends InputData { String columnTypeName = getProperty("ATTR-TYPENAME" + i); ColumnDescriptor column; if(columnProjStr != null) { - column = new ColumnDescriptor(columnName, columnTypeCode, i, columnTypeName, columnProjList.contains(i)); + column = new ColumnDescriptor(columnName, columnTypeCode, i, columnTypeName, columnProjList.contains(Integer.valueOf(i))); } else { /* For data formats that don't support column projection */ column = new ColumnDescriptor(columnName, columnTypeCode, i, columnTypeName);
