zeroshade commented on code in PR #185:
URL: https://github.com/apache/iceberg-go/pull/185#discussion_r1827805717
##########
table/scanner.go:
##########
@@ -393,3 +398,62 @@ type FileScanTask struct {
DeleteFiles []iceberg.DataFile
Start, Length int64
}
+
+// ToArrowRecords returns the arrow schema of the expected records and an
interator
+// that can be used with a range expression to read the records as they are
available.
+// If an error is encountered, during the planning and setup then this will
return the
+// error directly. If the error occurs while iterating the records, it will be
returned
+// by the iterator.
+//
+// The purpose for returning the schema up front is to handle the case where
there are no
+// rows returned. The resulting Arrow Schema of the projection will still be
known.
+func (s *Scan) ToArrowRecords(ctx context.Context) (*arrow.Schema,
iter.Seq2[arrow.Record, error], error) {
Review Comment:
updated
--
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]