Documentation
¶
Index ¶
- func BatchesEnabled(ctx context.Context) bool
- func EnableArrowBatches(ctx context.Context) context.Context
- func EnableUtf8Validation(ctx context.Context) context.Context
- func HigherPrecisionEnabled(ctx context.Context) bool
- func Utf8ValidationEnabled(ctx context.Context) bool
- func WithHigherPrecision(ctx context.Context) context.Context
- func WithTimestampOption(ctx context.Context, option TimestampOption) context.Context
- type BatchDataInfo
- type BatchDataProvider
- type BatchRaw
- type TimestampOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchesEnabled ¶
BatchesEnabled checks if arrow batches mode is enabled.
func EnableArrowBatches ¶
EnableArrowBatches sets the arrow batches mode flag in the context.
func EnableUtf8Validation ¶
EnableUtf8Validation enables UTF-8 validation for arrow batch string columns.
func HigherPrecisionEnabled ¶
HigherPrecisionEnabled checks if higher precision is enabled.
func Utf8ValidationEnabled ¶
Utf8ValidationEnabled checks if UTF-8 validation is enabled.
func WithHigherPrecision ¶
WithHigherPrecision enables higher precision mode in the context.
func WithTimestampOption ¶
func WithTimestampOption(ctx context.Context, option TimestampOption) context.Context
WithTimestampOption sets the arrow batches timestamp option in the context.
Types ¶
type BatchDataInfo ¶
type BatchDataInfo struct {
Batches []BatchRaw
RowTypes []query.ExecResponseRowType
Allocator memory.Allocator
Ctx context.Context
QueryID string
}
BatchDataInfo contains all information needed to build arrow batches.
type BatchDataProvider ¶
type BatchDataProvider interface {
GetArrowBatches() (*BatchDataInfo, error)
}
BatchDataProvider is implemented by SnowflakeRows to expose raw arrow batch data.
type BatchRaw ¶
type BatchRaw struct {
Records *[]arrow.Record
Index int
RowCount int
Location *time.Location
Download func(ctx context.Context) (*[]arrow.Record, int, error)
}
BatchRaw holds raw (untransformed) arrow records for a single batch.
type TimestampOption ¶
type TimestampOption int
TimestampOption controls how Snowflake timestamps are converted in arrow batches.
const ( // UseNanosecondTimestamp converts Snowflake timestamps to arrow timestamps with nanosecond precision. UseNanosecondTimestamp TimestampOption = iota // UseMicrosecondTimestamp converts Snowflake timestamps to arrow timestamps with microsecond precision. UseMicrosecondTimestamp // UseMillisecondTimestamp converts Snowflake timestamps to arrow timestamps with millisecond precision. UseMillisecondTimestamp // UseSecondTimestamp converts Snowflake timestamps to arrow timestamps with second precision. UseSecondTimestamp // UseOriginalTimestamp leaves Snowflake timestamps in their original format without conversion. UseOriginalTimestamp )
func GetTimestampOption ¶
func GetTimestampOption(ctx context.Context) TimestampOption
GetTimestampOption returns the timestamp option from the context.