Skip to content

Commit 61ae751

Browse files
committed
adding docstrings
1 parent ba9f735 commit 61ae751

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

arrow/cdata/interface.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,19 +284,29 @@ func ReleaseCArrowArray(arr *CArrowArray) { releaseArr(arr) }
284284
// ReleaseCArrowSchema calls ArrowSchemaRelease on the passed in cdata schema
285285
func ReleaseCArrowSchema(schema *CArrowSchema) { releaseSchema(schema) }
286286

287+
// RecordMessage is a simple container for a record batch channel to stream for
288+
// using the Async C Data Interface via ExportAsyncRecordBatchStream.
287289
type RecordMessage struct {
288290
Record arrow.Record
289291
AdditionalMetadata arrow.Metadata
290292
Err error
291293
}
292294

295+
// AsyncRecordBatchStream represents a stream of record batches being read in
296+
// from an ArrowAsyncDeviceStreamHandler's callbacks. If an error was encountered
297+
// before the call to on_schema, then this will contain the error as Err. Otherwise
298+
// the Schema will be valid and the Stream is a channel of RecordMessages being
299+
// propagated via on_next_task and extract_data.
293300
type AsyncRecordBatchStream struct {
294301
Schema *arrow.Schema
295302
AdditionalMetadata arrow.Metadata
296303
Err error
297304
Stream <-chan RecordMessage
298305
}
299306

307+
// AsyncStreamError represents an error encountered via a call to the on_error
308+
// callback of an ArrowAsyncDeviceStreamHandler. The Code is the error code that
309+
// should be errno compatible.
300310
type AsyncStreamError struct {
301311
Code int
302312
Msg string

0 commit comments

Comments
 (0)