drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-3623) Hive query hangs with limit 0 clause
Date Thu, 29 Oct 2015 01:08:27 GMT

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

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

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

    https://github.com/apache/drill/pull/193#discussion_r43339305
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/handlers/FindLimit0Visitor.java
---
    @@ -46,6 +51,32 @@ public static boolean containsLimit0(RelNode rel) {
         return visitor.isContains();
       }
     
    +  public static DrillRel addLimitOnTopOfLeafNodes(final DrillRel rel) {
    +    final RelShuttleImpl shuttle = new RelShuttleImpl() {
    +
    +      private RelNode addLimitAsParent(RelNode node) {
    +        final RexBuilder builder = node.getCluster().getRexBuilder();
    +        final RexLiteral offset = builder.makeExactLiteral(BigDecimal.ZERO);
    +        final RexLiteral fetch = builder.makeExactLiteral(BigDecimal.ZERO);
    +        return new DrillLimitRel(node.getCluster(), node.getTraitSet(), node, offset,
fetch);
    --- End diff --
    
    Thank you Julian, RelBuilder seems perfect for this case.
    
    Jinfeng, for now, making this visitor more general and using RelBuilder needs bigger changes,
so I am adding a TODO(DRILL-3993).


> 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)

Mime
View raw message