Github user denalex commented on a diff in the pull request: https://github.com/apache/incubator-hawq/pull/1209#discussion_r109265088 --- Diff: pxf/pxf-hive/src/main/java/org/apache/hawq/pxf/plugins/hive/HiveORCAccessor.java --- @@ -65,13 +78,24 @@ public HiveORCAccessor(InputData input) throws Exception { HiveUserData hiveUserData = HiveUtilities.parseHiveUserData(input, PXF_HIVE_SERDES.ORC_SERDE); initPartitionFields(hiveUserData.getPartitionKeys()); filterInFragmenter = hiveUserData.isFilterInFragmenter(); + useStats = Utilities.useStats(this, inputData); } @Override public boolean openForRead() throws Exception { - addColumns(); - addFilters(); - return super.openForRead(); + if (useStats) { + orcReader = HiveUtilities.getOrcReader(inputData); + if (orcReader == null) { + return false; + } + retrieveStats(); + objectsEmitted = 0; + return super.openForRead(); --- End diff -- should carry this common line outside if / else ?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---