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-4413) Improve FrameSupportTemplate to do the setup only when necessary
Date Thu, 18 Feb 2016 17:19:18 GMT

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

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

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

    https://github.com/apache/drill/pull/340#discussion_r53347747
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/window/FrameSupportTemplate.java
---
    @@ -134,44 +142,67 @@ private void cleanPartition() {
        * @throws DrillException if it can't write into the container
        */
       private int processPartition(final int currentRow) throws DrillException {
    -    logger.trace("process partition {}, currentRow: {}, outputCount: {}", partition,
currentRow, outputCount);
    +    logger.trace("{} rows remaining to process, currentRow: {}, outputCount: {}", remainingRows,
currentRow, outputCount);
     
         setupWriteFirstValue(internal, container);
     
    -    int row = currentRow;
    +    if (popConfig.isRows()) {
    +      return processROWS(currentRow);
    +    } else {
    +      return processRANGE(currentRow);
    +    }
    +  }
    +
    +  private int processROWS(int row) throws DrillException {
    +    //TODO we only need to call these once per batch
    --- End diff --
    
    We do the setup at the beginning of every partition. In case we have multiple partitions
in the same batch setup should only be done once. To make the matters more complicated, if
we are aggregating a single partition that spans multiple batches, we also need to do the
setup for every batch.
    The TODO is still valid. I create [DRILL-4413](https://issues.apache.org/jira/browse/DRILL-4413)
to keep track of it


> Improve FrameSupportTemplate to do the setup only when necessary
> ----------------------------------------------------------------
>
>                 Key: DRILL-4413
>                 URL: https://issues.apache.org/jira/browse/DRILL-4413
>             Project: Apache Drill
>          Issue Type: Sub-task
>          Components: Execution - Relational Operators
>    Affects Versions: 1.4.0
>            Reporter: Deneche A. Hakim
>             Fix For: Future
>
>
> Current implementation of FrameSupportTemplate does some setup at the beginning of every
partition. We shouldn't need to redo the setup until the batch changes.



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

Mime
View raw message