zhangfengcdt commented on code in PR #7316:
URL: https://github.com/apache/datafusion-comet/pull/7316#discussion_r4649460759


##########
native/core/src/execution/operators/scan.rs:
##########
@@ -365,21 +373,25 @@ impl Stream for ScanStream<'_> {
     type Item = DataFusionResult<RecordBatch>;
 
     fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> 
Poll<Option<Self::Item>> {
-        let mut timer = self.baseline_metrics.elapsed_compute().timer();
-        let mut scan_batch = self.scan.batch.try_lock().unwrap();
+        let this = self.get_mut();
+        if let Some(batch) = this.slicer.pending() {

Review Comment:
   Fixed in a5708d07e. `executePlan` no longer pulls JVM input before polling; 
it pulls only after a poll returns `Pending`, so a limit can finish on rows an 
operator above the scan still holds. The regression is in 
`CometExecIteratorLifecycleSuite`: a 10-row first batch, an input that throws 
on the next pull, and `LIMIT 3`. After the split moved to the scalar's own cap 
(7b2ea662d), a small scalar no longer slices, so the test (babf12a55) drives 
the limit over the scan directly. It still fails on the old loop.
   



-- 
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