vvysotskyi commented on a change in pull request #2092:
URL: https://github.com/apache/drill/pull/2092#discussion_r507187028
##########
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:
Placing this block here will also break files pruning logic. If the
condition is true, pruning logic wouldn't be applied. Please move it to the
places, where null is returned.
----------------------------------------------------------------
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]