arrow

package
v2.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BatchesEnabled

func BatchesEnabled(ctx context.Context) bool

BatchesEnabled checks if arrow batches mode is enabled.

func EnableArrowBatches

func EnableArrowBatches(ctx context.Context) context.Context

EnableArrowBatches sets the arrow batches mode flag in the context.

func EnableUtf8Validation

func EnableUtf8Validation(ctx context.Context) context.Context

EnableUtf8Validation enables UTF-8 validation for arrow batch string columns.

func HigherPrecisionEnabled

func HigherPrecisionEnabled(ctx context.Context) bool

HigherPrecisionEnabled checks if higher precision is enabled.

func Utf8ValidationEnabled

func Utf8ValidationEnabled(ctx context.Context) bool

Utf8ValidationEnabled checks if UTF-8 validation is enabled.

func WithHigherPrecision

func WithHigherPrecision(ctx context.Context) context.Context

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL