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

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

Github user jinfengni commented on the pull request:

    https://github.com/apache/drill/pull/193#issuecomment-152013964
  
    The original approach (skipping the execution phase for limit 0 
completely), actually could potentially have issues in some cases, due to the 
difference in Calcite rule and Drill execution rule, in terms of how type is 
determined.
    
    For example, sum(int) in calcite is resolved to be int, while in Drill 
execution, we changed to bigint. Another case is implicit cast. Currently, 
there are some small differences between Calcite and Drill execution. That 
means, if we skip the execution for limit 0, then types which are resolved in 
Calcite could be different from the type if the query goes through Drill 
execution. For BI tool like Tableau, that means the type returned from "limit 
0" query and type from a second query w/o "limit 0" could be different. 
    
    If we want to avoid the above issues, we have to detect all those cases, 
which are painful. That's why Sudheesh and I are now more inclined to this new 
approach. 
     


> Hive query hangs with limit 0 clause
> ------------------------------------
>
>                 Key: DRILL-3623
>                 URL: https://issues.apache.org/jira/browse/DRILL-3623
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - Hive
>    Affects Versions: 1.1.0
>         Environment: MapR cluster
>            Reporter: Andries Engelbrecht
>            Assignee: Jinfeng Ni
>             Fix For: Future
>
>
> Running a select * from hive.table limit 0 does not return (hangs).
> Select * from hive.table limit 1 works fine
> Hive table is about 6GB with 330 files with parquet using snappy compression.
> Data types are int, bigint, string and double.
> Querying directory with parquet files through the DFS plugin works fine
> select * from dfs.root.`/user/hive/warehouse/database/table` limit 0;



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

Reply via email to