drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinfengni <...@git.apache.org>
Subject [GitHub] drill pull request #597: DRILL-4905: Push down the LIMIT to the parquet read...
Date Thu, 29 Sep 2016 17:47:27 GMT
Github user jinfengni commented on a diff in the pull request:

    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java
    @@ -926,16 +944,22 @@ public GroupScan applyLimit(long maxRecords) {
    -    if (fileNames.size() == fileSet.size() ) {
    +    // If there is no change in fileSet and maxRecords is >= batchSize, no need to
create new groupScan.
    +    if (fileNames.size() == fileSet.size() && (maxRecords >= batchSize) )
           // There is no reduction of rowGroups. Return the original groupScan.
           logger.debug("applyLimit() does not apply!");
           return null;
    +    // If limit maxRecords is less than batchSize, update batchSize to the limit size.
    +    if (maxRecords < batchSize) {
    +      batchSize = (int) maxRecords;
    --- End diff --
    Maybe I miss something here. But seems to me as long as you declare "long batchSize" in
ParquetGroupScan/RowGroupScan (All the code seems to be new code), you do not have to have
this cast. 

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message