Documentation
¶
Index ¶
- Constants
- func ArrowSnowflakeTimestampToTime(column arrow.Array, sfType types.SnowflakeType, scale int, recIdx int, ...) *time.Time
- func WithArrowBatches(ctx context.Context) context.Context
- func WithTimestampOption(ctx context.Context, option ia.TimestampOption) context.Context
- func WithUtf8Validation(ctx context.Context) context.Context
- type ArrowBatch
- func (rb *ArrowBatch) ArrowSnowflakeTimestampToTime(rec arrow.Record, colIdx int, recIdx int) *time.Time
- func (rb *ArrowBatch) Fetch() (*[]arrow.Record, error)
- func (rb *ArrowBatch) GetAllocator() memory.Allocator
- func (rb *ArrowBatch) GetLocation() *time.Location
- func (rb *ArrowBatch) GetRowCount() int
- func (rb *ArrowBatch) GetRowTypes() []query.ExecResponseRowType
- func (rb *ArrowBatch) WithContext(ctx context.Context) *ArrowBatch
Constants ¶
const ( UseNanosecondTimestamp = ia.UseNanosecondTimestamp UseMicrosecondTimestamp = ia.UseMicrosecondTimestamp UseMillisecondTimestamp = ia.UseMillisecondTimestamp UseSecondTimestamp = ia.UseSecondTimestamp UseOriginalTimestamp = ia.UseOriginalTimestamp )
Timestamp option constants.
Variables ¶
This section is empty.
Functions ¶
func ArrowSnowflakeTimestampToTime ¶
func ArrowSnowflakeTimestampToTime( column arrow.Array, sfType types.SnowflakeType, scale int, recIdx int, loc *time.Location) *time.Time
ArrowSnowflakeTimestampToTime converts original timestamp returned by Snowflake to time.Time.
func WithArrowBatches ¶
WithArrowBatches returns a context that enables arrow batch mode for queries.
func WithTimestampOption ¶
WithTimestampOption returns a context that sets the timestamp conversion option for arrow batches.
Types ¶
type ArrowBatch ¶
type ArrowBatch struct {
// contains filtered or unexported fields
}
ArrowBatch represents a chunk of data retrievable in arrow.Record format.
func GetArrowBatches ¶
func GetArrowBatches(rows sf.SnowflakeRows) ([]*ArrowBatch, error)
GetArrowBatches retrieves arrow batches from SnowflakeRows. The rows must have been queried with arrowbatches.WithArrowBatches(ctx).
func (*ArrowBatch) ArrowSnowflakeTimestampToTime ¶
func (rb *ArrowBatch) ArrowSnowflakeTimestampToTime(rec arrow.Record, colIdx int, recIdx int) *time.Time
ArrowSnowflakeTimestampToTime converts an original Snowflake timestamp to time.Time.
func (*ArrowBatch) Fetch ¶
func (rb *ArrowBatch) Fetch() (*[]arrow.Record, error)
Fetch returns an array of arrow.Record representing this batch's data. Records are transformed from Snowflake's internal format to standard Arrow types.
func (*ArrowBatch) GetAllocator ¶
func (rb *ArrowBatch) GetAllocator() memory.Allocator
GetAllocator returns the memory allocator for this batch.
func (*ArrowBatch) GetLocation ¶
func (rb *ArrowBatch) GetLocation() *time.Location
GetLocation returns the timezone location for this batch.
func (*ArrowBatch) GetRowCount ¶
func (rb *ArrowBatch) GetRowCount() int
GetRowCount returns the number of rows in this batch.
func (*ArrowBatch) GetRowTypes ¶
func (rb *ArrowBatch) GetRowTypes() []query.ExecResponseRowType
GetRowTypes returns the column metadata for this batch.
func (*ArrowBatch) WithContext ¶
func (rb *ArrowBatch) WithContext(ctx context.Context) *ArrowBatch
WithContext sets the context for subsequent Fetch calls on this batch.