[ 
https://issues.apache.org/jira/browse/DRILL-4083?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15004879#comment-15004879
 ] 

ASF GitHub Bot commented on DRILL-4083:
---------------------------------------

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

    https://github.com/apache/drill/pull/253#discussion_r44845244
  
    --- Diff: 
contrib/storage-hive/core/src/test/java/org/apache/drill/exec/hive/TestHiveStorage.java
 ---
    @@ -36,6 +36,19 @@ public static void setupOptions() throws Exception {
         test(String.format("alter session set `%s` = true", 
PlannerSettings.ENABLE_DECIMAL_DATA_TYPE_KEY));
       }
     
    +
    +  @Test // DRILL-4083
    +  public void testNativeScanWhenNoColumnIsRead() throws Exception {
    +    try {
    +      test(String.format("alter session set `%s` = true", 
ExecConstants.HIVE_OPTIMIZE_SCAN_WITH_NATIVE_READERS));
    +
    +      String query = "SELECT count(*) FROM hive.readtest_parquet";
    +      testPhysicalPlan(query, "hive-drill-native-parquet-scan");
    +    } finally {
    +      test(String.format("alter session set `%s` = false", 
ExecConstants.HIVE_OPTIMIZE_SCAN_WITH_NATIVE_READERS));
    --- End diff --
    
    Will it make sense to change it back to default value in the finally block 
(in case we change the default value for this option in future release)? 



> Drill not using HiveDrillNativeParquetScan if no column is needed to be read 
> from HIVE
> --------------------------------------------------------------------------------------
>
>                 Key: DRILL-4083
>                 URL: https://issues.apache.org/jira/browse/DRILL-4083
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - Hive
>            Reporter: Sean Hsuan-Yi Chu
>            Assignee: Sean Hsuan-Yi Chu
>
> For example, for a query such as:
> {code}
> Select count(*) from hive.parquetTable
> {code}
> would not use HiveDrillNativeParquetScan. However, the following query will 
> use:
> {code}
> Select count(*) from hive.parquetTable where column > 0
> {code}
> Ideally, both should use the same HiveDrillNativeParquetScan



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to