cgivre commented on code in PR #2580: URL: https://github.com/apache/drill/pull/2580#discussion_r908569894
########## contrib/storage-kafka/src/main/java/org/apache/drill/exec/store/kafka/KafkaGroupScan.java: ########## @@ -262,6 +269,17 @@ public void applyAssignments(List<DrillbitEndpoint> incomingEndpoints) { assignments = AssignmentCreator.getMappings(incomingEndpoints, Lists.newArrayList(partitionWorkMap.values())); } + @Override + public GroupScan applyLimit(int maxRecords) { + records = maxRecords; // Just apply the limit value into sub-scan + return super.applyLimit(maxRecords); + } + Review Comment: I wouldn't recommend that. My understanding of how all this works is that Calcite/Drill create multiple copies of the GroupScan to try to find the optimal query plan. The GroupScans have to be immutable otherwise strange things will happen when you execute more complex queries, and in all likelihood, the limit won't be pushed down. -- 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. To unsubscribe, e-mail: dev-unsubscr...@drill.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org