transform

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DictIdKey = "dictId"

Variables

Functions

This section is empty.

Types

type DictionaryField

type DictionaryField struct {

	// Dictionary ID
	DictID string
	// contains filtered or unexported fields
}

DictionaryField is a FieldTransform that transforms dictionary fields to a given index type. If the index type is nil, the dictionary is downgraded to its value type.

func NewDictionaryField

func NewDictionaryField(
	path string,
	dictID string,
	config *cfg.Dictionary,
	schemaUpdateRequest *update.SchemaUpdateRequest,
	events *events.Events,
) *DictionaryField

func (*DictionaryField) AddTotal

func (t *DictionaryField) AddTotal(total int)

func (*DictionaryField) Cardinality

func (t *DictionaryField) Cardinality() uint64

Cardinality returns the cardinality of the dictionary field.

func (*DictionaryField) CumulativeTotal

func (t *DictionaryField) CumulativeTotal() uint64

CumulativeTotal returns the number of values inserted in the corresponding column since its creation.

func (*DictionaryField) IndexType

func (t *DictionaryField) IndexType() arrow.DataType

IndexType returns the index type of the column.

func (*DictionaryField) Path added in v0.7.0

func (t *DictionaryField) Path() string

Path returns the path of the dictionary field.

func (*DictionaryField) RevertCounters

func (t *DictionaryField) RevertCounters()

RevertCounters resets the cumulative total to the previous cumulative total.

func (*DictionaryField) SetCardinality

func (t *DictionaryField) SetCardinality(card uint64, stats *stats.RecordBuilderStats)

func (*DictionaryField) Transform

func (t *DictionaryField) Transform(field *arrow.Field) *arrow.Field

type IdentityField

type IdentityField struct {
	// contains filtered or unexported fields
}

IdentityField is a FieldTransform that returns a copy of the field.

func NewIdentityField added in v0.7.0

func NewIdentityField(path string) *IdentityField

func (*IdentityField) Path added in v0.7.0

func (t *IdentityField) Path() string

func (*IdentityField) RevertCounters

func (t *IdentityField) RevertCounters()

func (*IdentityField) Transform

func (t *IdentityField) Transform(field *arrow.Field) *arrow.Field

type NoField

type NoField struct{}

NoField is a FieldTransform that returns nil, so in practice it removes the field.

func (*NoField) Path added in v0.7.0

func (t *NoField) Path() string

func (*NoField) RevertCounters

func (t *NoField) RevertCounters()

func (*NoField) Transform

func (t *NoField) Transform(_ *arrow.Field) *arrow.Field

Jump to

Keyboard shortcuts

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