andygrove commented on code in PR #1133:
URL: https://github.com/apache/datafusion-comet/pull/1133#discussion_r1870681844


##########
spark/src/main/java/org/apache/comet/CometBatchIterator.java:
##########
@@ -33,12 +33,27 @@
 public class CometBatchIterator {
   final Iterator<ColumnarBatch> input;
   final NativeUtil nativeUtil;
+  private ColumnarBatch currentBatch = null;
 
   CometBatchIterator(Iterator<ColumnarBatch> input, NativeUtil nativeUtil) {
     this.input = input;
     this.nativeUtil = nativeUtil;
   }
 
+  /**
+   * Fetch the next input batch.
+   *
+   * @return Number of rows in next batch or -1 if no batches left.
+   */
+  public int hasNext() {

Review Comment:
   I run into this error when trying to return bool:
   
   ```
   224 |         comet_batch_iterator(iter).has_next() -> bool)?
       |                                                  ^^^^ the trait 
`std::convert::From<JValueGen<JObject<'_>>>` is not implemented for `bool`, 
which is required by `bool: TryFrom<JValueGen<JObject<'_>>>`
   ```



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