anuragrai16 commented on code in PR #18725:
URL: https://github.com/apache/pinot/pull/18725#discussion_r3421649547


##########
pinot-core/src/main/java/org/apache/pinot/core/operator/InstanceResponseOperator.java:
##########
@@ -96,6 +97,13 @@ protected InstanceResponseBlock 
buildInstanceResponseBlock(BaseResultsBlock base
         String.valueOf(_threadMemAllocatedBytes));
     
instanceResponseBlock.addMetadata(MetadataKey.SYSTEM_ACTIVITIES_CPU_TIME_NS.getName(),
         String.valueOf(_systemActivitiesCpuTimeNs));
+    Integer implicitLimit = 
QueryOptionsUtils.getLiteModeImplicitLeafStageLimit(
+        _queryContext.getQueryOptions());
+    // false-positive when table has exactly implicitLimit rows
+    if (implicitLimit != null && baseResultsBlock.getNumRows() >= 
implicitLimit) {
+      instanceResponseBlock.addMetadata(
+          MetadataKey.LITE_MODE_LEAF_STAGE_LIMIT_REACHED.getName(), "true");

Review Comment:
   dont think that's needed. the final response has a 
`mseLiteLeafStageEffectiveLimit` that conveys to the user what was the 
effective limit pushed to the server, so we already know each server is 
returning <= `mseLiteLeafStageEffectiveLimit` 



-- 
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: [email protected]

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to