zhuqi-lucas commented on code in PR #14499:
URL: https://github.com/apache/datafusion/pull/14499#discussion_r1942551654


##########
datafusion/sqllogictest/test_files/aggregate.slt:
##########
@@ -5032,18 +5032,17 @@ logical_plan
 03)----Aggregate: groupBy=[[aggregate_test_100.c3]], 
aggr=[[min(aggregate_test_100.c1)]]
 04)------TableScan: aggregate_test_100 projection=[c1, c3]
 physical_plan
-01)GlobalLimitExec: skip=0, fetch=5

Review Comment:
   We default to use skip=0 for the SortPreservingMergeExec:
   
   ```rust
    1 => match self.fetch {
                   Some(fetch) => {
                       let stream = self.input.execute(0, context)?;
                       debug!("Done getting stream for 
SortPreservingMergeExec::execute with 1 input with {fetch}");
                       Ok(Box::pin(LimitStream::new(
                           stream,
                           0,
                           Some(fetch),
                           BaselineMetrics::new(&self.metrics, partition),
                       )))
                   }
   ```
   
   ```rust
   impl LimitStream {
       pub fn new(
           input: SendableRecordBatchStream,
           skip: usize,
           fetch: Option<usize>,
           baseline_metrics: BaselineMetrics,
       ) -> Self {
           let schema = input.schema();
           Self {
               skip,
               fetch: fetch.unwrap_or(usize::MAX),
               input: Some(input),
               schema,
               baseline_metrics,
           }
       }
   ```
   
   
   



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to