utils

package
v0.5.3-rc.2 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakePredicateIsNotNullColumn

func MakePredicateIsNotNullColumn(columnName string) *api_service_protos.TPredicate_IsNotNull

func MakePredicateIsNullColumn

func MakePredicateIsNullColumn(columnName string) *api_service_protos.TPredicate_IsNull

func MustProtobufDifference

func MustProtobufDifference(expected, actual proto.Message) string

func NewInt32IDArrayBuilder added in v0.5.1

func NewInt32IDArrayBuilder(pool memory.Allocator) *array.Int32Builder

func NewInt64IDArrayBuilder added in v0.5.1

func NewInt64IDArrayBuilder(pool memory.Allocator) *array.Int64Builder

func ProtobufDifference

func ProtobufDifference(expected, actual proto.Message) (string, error)

Types

type ArrowIDBuilder added in v0.5.1

type ArrowIDBuilder[ID TableIDTypes] interface {
	*array.Int64Builder | *array.Int32Builder
	Append(ID)
	NewArray() arrow.Array
	Release()
}

type Record added in v0.4.0

type Record[ID TableIDTypes, IDBUILDER ArrowIDBuilder[ID]] struct {
	Columns map[string]any
}

Record is somewhat equivalent to arrow.Record. Store columns in map because order of columns in some datasource is undefined. (i.e. in YDB - https://st.yandex-team.ru/KIKIMR-20836)

func (*Record[ID, IDBUILDER]) MatchRecord added in v0.4.0

func (r *Record[ID, IDBUILDER]) MatchRecord(
	t *testing.T,
	receivedRecord arrow.Record,
	receivedSchema *api_service_protos.TSchema,
	idArrBuilder IDBUILDER)

type Table added in v0.4.0

type Table[T TableIDTypes, K ArrowIDBuilder[T]] struct {
	Name                  string
	Schema                *TableSchema
	Records               []*Record[T, K] // Large tables may consist of multiple records
	IDArrayBuilderFactory func() K
}

func (*Table[T, K]) MatchRecords added in v0.4.0

func (tb *Table[T, K]) MatchRecords(t *testing.T, records []arrow.Record, schema *api_service_protos.TSchema)

func (*Table[_, _]) MatchSchema added in v0.4.0

func (tb *Table[_, _]) MatchSchema(t *testing.T, schema *api_service_protos.TSchema)

type TableIDTypes added in v0.5.1

type TableIDTypes interface {
	int32 | int64
}

type TableSchema added in v0.4.0

type TableSchema struct {
	Columns map[string]*Ydb.Type
}

Jump to

Keyboard shortcuts

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