mirror of
https://github.com/apache/arrow.git
synced 2026-10-29 09:05:47 +08:00
Result iterator api
This commit is contained in:
2 files changed
+3
-3
No files matched your search
@@ -565,7 +565,7 @@ cdef class ScanTask:
|
||||
iterator = move(GetResultValue(move(self.task.Scan())))
|
||||
|
||||
while True:
|
||||
iterator.Next(&record_batch)
|
||||
record_batch = GetResultValue(iterator.Next())
|
||||
if record_batch.get() == nullptr:
|
||||
raise StopIteration()
|
||||
else:
|
||||
@@ -737,7 +737,7 @@ cdef class Scanner:
|
||||
iterator = move(GetResultValue(move(self.scanner.Scan())))
|
||||
|
||||
while True:
|
||||
iterator.Next(&task)
|
||||
task = GetResultValue(iterator.Next())
|
||||
if task.get() == nullptr:
|
||||
raise StopIteration()
|
||||
else:
|
||||
|
||||
@@ -1686,7 +1686,7 @@ cdef extern from 'arrow/util/compression.h' namespace 'arrow' nogil:
|
||||
|
||||
cdef extern from 'arrow/util/iterator.h' namespace 'arrow' nogil:
|
||||
cdef cppclass CIterator" arrow::Iterator"[T]:
|
||||
CStatus Next(T* out)
|
||||
CResult[T] Next()
|
||||
CStatus Visit[Visitor](Visitor&& visitor)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user