Result iterator api

This commit is contained in:
Krisztián Szűcs committed 2019-12-12 12:27:38 +01:00
1 parent 7553caa96b
commit b8949a3cee
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -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:
+1 -1
View File
@@ -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)