Github user sohami commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1111#discussion_r166209232
  
    --- Diff: 
contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/HiveMetadataProvider.java
 ---
    @@ -264,6 +265,10 @@ private HiveStats 
getStatsEstimateFromInputSplits(final List<LogicalInputSplit>
               final List<LogicalInputSplit> splits = Lists.newArrayList();
               final JobConf job = new JobConf(hiveConf);
               HiveUtilities.addConfToJob(job, properties);
    +          if (AcidUtils.isTablePropertyTransactional(properties)) {
    +            AcidUtils.setTransactionalTableScan(job, true);
    +            HiveUtilities.setColumnTypes(job, properties, true, sd);
    +          }
    --- End diff --
    
    How about refactoring this block of code to a new method in HiveUtilities ? 
Like `verifyAndAddTransactionalProperty()`. Then just call that method from 
both here and HiveAbstractReader


---

Reply via email to