Documentation
¶
Index ¶
- func NewArrowIPCStreamIterator(ctx context.Context, rpi rowscanner.ResultPageIterator, ...) rows.ArrowIPCStreamIterator
- func NewArrowRecordIterator(ctx context.Context, rpi rowscanner.ResultPageIterator, bi BatchIterator, ...) rows.ArrowBatchIterator
- func NewArrowRowScanner(resultSetMetadata *cli_service.TGetResultSetMetadataResp, ...) (rowscanner.RowScanner, dbsqlerr.DBError)
- type BatchIterator
- func NewBatchIterator(ipcIterator IPCStreamIterator, startRowOffset int64) BatchIterator
- func NewCloudBatchIterator(ctx context.Context, files []*cli_service.TSparkArrowResultLink, ...) (BatchIterator, dbsqlerr.DBError)
- func NewLocalBatchIterator(ctx context.Context, batches []*cli_service.TSparkArrowBatch, ...) (BatchIterator, dbsqlerr.DBError)
- type IPCStreamIterator
- type Queue
- type RowValues
- type SparkArrowBatch
- type SparkArrowRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewArrowIPCStreamIterator ¶
func NewArrowIPCStreamIterator(ctx context.Context, rpi rowscanner.ResultPageIterator, ipcIterator IPCStreamIterator, arrowSchemaBytes []byte, cfg config.Config) rows.ArrowIPCStreamIterator
NewArrowIPCStreamIterator creates a new iterator for Arrow IPC streams
func NewArrowRecordIterator ¶
func NewArrowRecordIterator(ctx context.Context, rpi rowscanner.ResultPageIterator, bi BatchIterator, arrowSchemaBytes []byte, cfg config.Config) rows.ArrowBatchIterator
func NewArrowRowScanner ¶
func NewArrowRowScanner(resultSetMetadata *cli_service.TGetResultSetMetadataResp, rowSet *cli_service.TRowSet, cfg *config.Config, logger *dbsqllog.DBSQLLogger, ctx context.Context, onCloudFetchDownload func(downloadMs int64)) (rowscanner.RowScanner, dbsqlerr.DBError)
NewArrowRowScanner returns an instance of RowScanner which handles arrow format results. onCloudFetchDownload is an optional callback invoked for each CloudFetch S3 file download with the download duration in milliseconds. Pass nil for non-telemetry paths.
Types ¶
type BatchIterator ¶
type BatchIterator interface {
Next() (SparkArrowBatch, error)
HasNext() bool
Close()
}
BatchIterator is the interface for iterating through Arrow batches
func NewBatchIterator ¶
func NewBatchIterator(ipcIterator IPCStreamIterator, startRowOffset int64) BatchIterator
NewBatchIterator creates a BatchIterator from an IPCStreamIterator
func NewCloudBatchIterator ¶
func NewCloudBatchIterator( ctx context.Context, files []*cli_service.TSparkArrowResultLink, startRowOffset int64, arrowSchemaBytes []byte, cfg *config.Config, onFileDownloaded func(downloadMs int64), ) (BatchIterator, dbsqlerr.DBError)
NewCloudBatchIterator creates a cloud-based BatchIterator for backward compatibility. arrowSchemaBytes is the authoritative schema from GetResultSetMetadata, used to override stale column names in cached Arrow IPC files.
func NewLocalBatchIterator ¶
func NewLocalBatchIterator( ctx context.Context, batches []*cli_service.TSparkArrowBatch, startRowOffset int64, arrowSchemaBytes []byte, cfg *config.Config, ) (BatchIterator, dbsqlerr.DBError)
NewLocalBatchIterator creates a local BatchIterator for backward compatibility
type IPCStreamIterator ¶
func NewCloudIPCStreamIterator ¶
func NewCloudIPCStreamIterator( ctx context.Context, files []*cli_service.TSparkArrowResultLink, startRowOffset int64, cfg *config.Config, onFileDownloaded func(downloadMs int64), ) (IPCStreamIterator, dbsqlerr.DBError)
func NewLocalIPCStreamIterator ¶
func NewLocalIPCStreamIterator( ctx context.Context, batches []*cli_service.TSparkArrowBatch, startRowOffset int64, arrowSchemaBytes []byte, cfg *config.Config, ) (IPCStreamIterator, dbsqlerr.DBError)
type Queue ¶
type RowValues ¶
type RowValues interface {
rowscanner.Delimiter
Close()
NColumns() int
SetColumnValues(columnIndex int, values arrow.ArrayData) error
IsNull(columnIndex int, rowNumber int64) bool
Value(columnIndex int, rowNumber int64) (any, error)
// DecimalStringValue returns a native-Arrow DECIMAL column value as a
// lossless, scale-applied string. ok is false when the column is not backed
// by a decimal128 holder, in which case the caller should fall back to
// Value. Used only for top-level DECIMAL columns when native decimal is
// enabled; see databricks/databricks-sql-go#274.
DecimalStringValue(columnIndex int, rowNumber int64) (value string, ok bool)
SetDelimiter(d rowscanner.Delimiter)
}
Abstraction for holding the values for a set of rows
func NewRowValues ¶
func NewRowValues(d rowscanner.Delimiter, holders []columnValues) RowValues
type SparkArrowBatch ¶
type SparkArrowBatch interface {
rowscanner.Delimiter
Next() (SparkArrowRecord, error)
HasNext() bool
Close()
}
Abstraction for a set of arrow records
type SparkArrowRecord ¶
type SparkArrowRecord interface {
rowscanner.Delimiter
arrow.RecordBatch
}
Abstraction for an arrow record