cgivre commented on a change in pull request #2092:
URL: https://github.com/apache/drill/pull/2092#discussion_r507187547



##########
File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/AbstractGroupScanWithMetadata.java
##########
@@ -453,6 +458,14 @@ public boolean supportsLimitPushdown() {
   public GroupScan applyLimit(int maxRecords) {
     maxRecords = Math.max(maxRecords, 1); // Make sure it request at least 1 
row -> 1 file.
     GroupScanWithMetadataFilterer<?> prunedMetadata = getFilterer();
+
+    // Return the group scan with the limit pushed down
+    if (this.maxRecords != maxRecords) {

Review comment:
       @vvysotskyi 
   Done.  I did that originally, but it seemed like repetitive code to me.  
Also, the pruning unit tests did pass with the logic at the top of the 
function.  However, I will defer to you on this and the pruning is quite 
complex and I don't want to break it. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to