Documentation ¶
Index ¶
- Constants
- Variables
- func SerializeExpr(expr Expression, mem memory.Allocator) (*memory.Buffer, error)
- func SerializeOptions(opts FunctionOptions, mem memory.Allocator) (*memory.Buffer, error)
- type ArithmeticOptions
- type ArrayDatum
- func (d *ArrayDatum) Chunks() []arrow.Array
- func (d *ArrayDatum) Descr() ValueDescr
- func (d *ArrayDatum) Equals(other Datum) bool
- func (ArrayDatum) Kind() DatumKind
- func (d *ArrayDatum) Len() int64
- func (d *ArrayDatum) MakeArray() arrow.Array
- func (d *ArrayDatum) NullN() int64
- func (d *ArrayDatum) Release()
- func (ArrayDatum) Shape() ValueShape
- func (d *ArrayDatum) String() string
- func (d *ArrayDatum) ToScalar() (scalar.Scalar, error)
- func (d *ArrayDatum) Type() arrow.DataType
- type ArrayLikeDatum
- type Call
- func (c *Call) Bind(ctx context.Context, mem memory.Allocator, schema *arrow.Schema) (Expression, error)
- func (c *Call) Descr() ValueDescr
- func (c *Call) Equals(other Expression) bool
- func (c *Call) FieldRef() *FieldRef
- func (c *Call) Hash() uint64
- func (c *Call) IsBound() bool
- func (c *Call) IsNullLiteral() bool
- func (c *Call) IsSatisfiable() bool
- func (c *Call) IsScalarExpr() bool
- func (c *Call) Release()
- func (c *Call) String() string
- func (c *Call) Type() arrow.DataType
- type CastOptions
- type ChunkedDatum
- func (d *ChunkedDatum) Chunks() []arrow.Array
- func (d *ChunkedDatum) Descr() ValueDescr
- func (d *ChunkedDatum) Equals(other Datum) bool
- func (ChunkedDatum) Kind() DatumKind
- func (d *ChunkedDatum) Len() int64
- func (d *ChunkedDatum) NullN() int64
- func (d *ChunkedDatum) Release()
- func (ChunkedDatum) Shape() ValueShape
- func (d *ChunkedDatum) String() string
- func (d *ChunkedDatum) Type() arrow.DataType
- type CollectionDatum
- type Datum
- type DatumKind
- type EmptyDatum
- type Expression
- func And(lhs, rhs Expression, ops ...Expression) Expression
- func Cast(ex Expression, dt arrow.DataType) Expression
- func DeserializeExpr(mem memory.Allocator, buf *memory.Buffer) (Expression, error)
- func Equal(lhs, rhs Expression) Expression
- func Greater(lhs, rhs Expression) Expression
- func GreaterEqual(lhs, rhs Expression) Expression
- func IsNull(lhs Expression, nanIsNull bool) Expression
- func IsValid(lhs Expression) Expression
- func Less(lhs, rhs Expression) Expression
- func LessEqual(lhs, rhs Expression) Expression
- func NewCall(name string, args []Expression, opts FunctionOptions) Expression
- func NewFieldRef(field string) Expression
- func NewLiteral(arg interface{}) Expression
- func NewRef(ref FieldRef) Expression
- func Not(expr Expression) Expression
- func NotEqual(lhs, rhs Expression) Expression
- func NullLiteral(dt arrow.DataType) Expression
- func Or(lhs, rhs Expression, ops ...Expression) Expression
- func Project(values []Expression, names []string) Expression
- type FieldPath
- func (f FieldPath) Get(s *arrow.Schema) (*arrow.Field, error)
- func (f FieldPath) GetColumn(batch arrow.Record) (arrow.Array, error)
- func (f FieldPath) GetField(field arrow.Field) (*arrow.Field, error)
- func (f FieldPath) GetFieldFromSlice(fields []arrow.Field) (*arrow.Field, error)
- func (f FieldPath) GetFieldFromType(typ arrow.DataType) (*arrow.Field, error)
- func (f FieldPath) String() string
- type FieldRef
- func (f *FieldRef) Equals(other FieldRef) bool
- func (f *FieldRef) FieldPath() FieldPath
- func (f FieldRef) FindAll(fields []arrow.Field) []FieldPath
- func (f FieldRef) FindAllField(field arrow.Field) []FieldPath
- func (f FieldRef) FindOne(schema *arrow.Schema) (FieldPath, error)
- func (f FieldRef) FindOneOrNone(schema *arrow.Schema) (FieldPath, error)
- func (f FieldRef) FindOneOrNoneRecord(root arrow.Record) (FieldPath, error)
- func (f FieldRef) GetAllColumns(root arrow.Record) ([]arrow.Array, error)
- func (f FieldRef) GetOneColumnOrNone(root arrow.Record) (arrow.Array, error)
- func (f FieldRef) GetOneField(schema *arrow.Schema) (*arrow.Field, error)
- func (f FieldRef) GetOneOrNone(schema *arrow.Schema) (*arrow.Field, error)
- func (f FieldRef) Hash(seed maphash.Seed) uint64
- func (f *FieldRef) IsFieldPath() bool
- func (f *FieldRef) IsName() bool
- func (f *FieldRef) IsNested() bool
- func (f *FieldRef) Name() string
- func (f FieldRef) String() string
- type FilterOptions
- type FunctionOptions
- type FunctionOptionsEqual
- type Literal
- func (l *Literal) Bind(ctx context.Context, mem memory.Allocator, schema *arrow.Schema) (Expression, error)
- func (l *Literal) Descr() ValueDescr
- func (l *Literal) Equals(other Expression) bool
- func (Literal) FieldRef() *FieldRef
- func (l *Literal) Hash() uint64
- func (l *Literal) IsBound() bool
- func (l *Literal) IsNullLiteral() bool
- func (l *Literal) IsSatisfiable() bool
- func (l *Literal) IsScalarExpr() bool
- func (l *Literal) Release()
- func (l *Literal) String() string
- func (l *Literal) Type() arrow.DataType
- type MakeStructOptions
- type NullOptions
- type NullSelectionBehavior
- type Parameter
- func (p *Parameter) Bind(ctx context.Context, mem memory.Allocator, schema *arrow.Schema) (Expression, error)
- func (p *Parameter) Descr() ValueDescr
- func (p *Parameter) Equals(other Expression) bool
- func (p *Parameter) FieldRef() *FieldRef
- func (p *Parameter) Hash() uint64
- func (p *Parameter) IsBound() bool
- func (Parameter) IsNullLiteral() bool
- func (p *Parameter) IsSatisfiable() bool
- func (p *Parameter) IsScalarExpr() bool
- func (p *Parameter) Release()
- func (p *Parameter) String() string
- func (p *Parameter) Type() arrow.DataType
- type RecordDatum
- type ScalarDatum
- func (ScalarDatum) Chunks() []arrow.Array
- func (d *ScalarDatum) Descr() ValueDescr
- func (d *ScalarDatum) Equals(other Datum) bool
- func (ScalarDatum) Kind() DatumKind
- func (ScalarDatum) Len() int64
- func (d *ScalarDatum) NullN() int64
- func (d *ScalarDatum) Release()
- func (ScalarDatum) Shape() ValueShape
- func (d *ScalarDatum) String() string
- func (d *ScalarDatum) ToScalar() (scalar.Scalar, error)
- func (d *ScalarDatum) Type() arrow.DataType
- type SetLookupOptions
- type StrptimeOptions
- type TableDatum
- type TableLikeDatum
- type ValueDescr
- type ValueShape
Constants ¶
const UnknownLength int64 = -1
Variables ¶
var ( ErrEmpty = errors.New("cannot traverse empty field path") ErrNoChildren = errors.New("trying to get child of type with no children") ErrIndexRange = errors.New("index out of range") ErrMultipleMatches = errors.New("multiple matches") ErrNoMatch = errors.New("no match") ErrInvalid = errors.New("field ref invalid") )
Functions ¶
func SerializeExpr ¶
SerializeExpr serializes expressions by converting them to Metadata and storing this in the schema of a Record. Embedded arrays and scalars are stored in its columns. Finally the record is written as an IPC file
func SerializeOptions ¶
Types ¶
type ArithmeticOptions ¶
type ArithmeticOptions struct {
CheckOverflow bool `compute:"check_overflow"`
}
func (ArithmeticOptions) TypeName ¶
func (ArithmeticOptions) TypeName() string
type ArrayDatum ¶
ArrayDatum references an array.Data object which can be used to create array instances from if needed.
func (*ArrayDatum) Chunks ¶
func (d *ArrayDatum) Chunks() []arrow.Array
func (*ArrayDatum) Descr ¶
func (d *ArrayDatum) Descr() ValueDescr
func (*ArrayDatum) Equals ¶
func (d *ArrayDatum) Equals(other Datum) bool
func (ArrayDatum) Kind ¶
func (ArrayDatum) Kind() DatumKind
func (*ArrayDatum) Len ¶
func (d *ArrayDatum) Len() int64
func (*ArrayDatum) MakeArray ¶
func (d *ArrayDatum) MakeArray() arrow.Array
func (*ArrayDatum) NullN ¶
func (d *ArrayDatum) NullN() int64
func (*ArrayDatum) Release ¶
func (d *ArrayDatum) Release()
func (ArrayDatum) Shape ¶
func (ArrayDatum) Shape() ValueShape
func (*ArrayDatum) String ¶
func (d *ArrayDatum) String() string
func (*ArrayDatum) Type ¶
func (d *ArrayDatum) Type() arrow.DataType
type ArrayLikeDatum ¶
type ArrayLikeDatum interface { Datum Shape() ValueShape Descr() ValueDescr NullN() int64 Type() arrow.DataType Chunks() []arrow.Array }
ArrayLikeDatum is an interface for treating a Datum similarly to an Array, so that it is easy to differentiate between Record/Table/Collection and Scalar, Array/ChunkedArray for ease of use. Chunks will return an empty slice for Scalar, a slice with 1 element for Array, and the slice of chunks for a chunked array.
type Call ¶
type Call struct {
// contains filtered or unexported fields
}
Call is a function call with specific arguments which are themselves other expressions. A call can also have options that are specific to the function in question. It must be bound to determine the shape and type.
func (*Call) Descr ¶
func (c *Call) Descr() ValueDescr
func (*Call) Equals ¶
func (c *Call) Equals(other Expression) bool
func (*Call) IsNullLiteral ¶
func (*Call) IsSatisfiable ¶
func (*Call) IsScalarExpr ¶
type CastOptions ¶
type CastOptions struct { ToType arrow.DataType `compute:"to_type"` AllowIntOverflow bool `compute:"allow_int_overflow"` AllowTimeTruncate bool `compute:"allow_time_truncate"` AllowTimeOverflow bool `compute:"allow_time_overflow"` AllowDecimalTruncate bool `compute:"allow_decimal_truncate"` AllowFloatTruncate bool `compute:"allow_float_truncate"` AllowInvalidUtf8 bool `compute:"allow_invalid_utf8"` }
func DefaultCastOptions ¶
func DefaultCastOptions(safe bool) *CastOptions
func NewCastOptions ¶
func NewCastOptions(dt arrow.DataType, safe bool) *CastOptions
func (CastOptions) TypeName ¶
func (CastOptions) TypeName() string
type ChunkedDatum ¶
ChunkedDatum contains a chunked array for use with expressions and compute.
func (*ChunkedDatum) Chunks ¶
func (d *ChunkedDatum) Chunks() []arrow.Array
func (*ChunkedDatum) Descr ¶
func (d *ChunkedDatum) Descr() ValueDescr
func (*ChunkedDatum) Equals ¶
func (d *ChunkedDatum) Equals(other Datum) bool
func (ChunkedDatum) Kind ¶
func (ChunkedDatum) Kind() DatumKind
func (*ChunkedDatum) Len ¶
func (d *ChunkedDatum) Len() int64
func (*ChunkedDatum) NullN ¶
func (d *ChunkedDatum) NullN() int64
func (*ChunkedDatum) Release ¶
func (d *ChunkedDatum) Release()
func (ChunkedDatum) Shape ¶
func (ChunkedDatum) Shape() ValueShape
func (*ChunkedDatum) String ¶
func (d *ChunkedDatum) String() string
func (*ChunkedDatum) Type ¶
func (d *ChunkedDatum) Type() arrow.DataType
type CollectionDatum ¶
type CollectionDatum []Datum
CollectionDatum is a slice of Datums
func (CollectionDatum) Equals ¶
func (c CollectionDatum) Equals(other Datum) bool
func (CollectionDatum) Kind ¶
func (CollectionDatum) Kind() DatumKind
func (CollectionDatum) Len ¶
func (c CollectionDatum) Len() int64
func (CollectionDatum) Release ¶
func (c CollectionDatum) Release()
func (CollectionDatum) String ¶
func (c CollectionDatum) String() string
type Datum ¶
Datum is a variant interface for wrapping the various Arrow data structures for now the various Datum types just hold a Value which is the type they are wrapping, but it might make sense in the future for those types to actually be aliases or embed their types instead. Not sure yet.
func NewDatum ¶
func NewDatum(value interface{}) Datum
NewDatum will construct the appropriate Datum type based on what is passed in as the argument.
An arrow.Array gets an ArrayDatum An array.Chunked gets a ChunkedDatum An array.Record gets a RecordDatum an array.Table gets a TableDatum a []Datum gets a CollectionDatum a scalar.Scalar gets a ScalarDatum
Anything else is passed to scalar.MakeScalar and recieves a scalar datum of that appropriate type.
type DatumKind ¶
type DatumKind int
DatumKind is an enum used for denoting which kind of type a datum is encapsulating
type EmptyDatum ¶
type EmptyDatum struct{}
EmptyDatum is the null case, a Datum with nothing in it.
func (EmptyDatum) Equals ¶
func (EmptyDatum) Equals(other Datum) bool
func (EmptyDatum) Kind ¶
func (EmptyDatum) Kind() DatumKind
func (EmptyDatum) Len ¶
func (EmptyDatum) Len() int64
func (EmptyDatum) Release ¶
func (EmptyDatum) Release()
func (EmptyDatum) String ¶
func (EmptyDatum) String() string
type Expression ¶
type Expression interface { fmt.Stringer // IsBound returns true if this expression has been bound to a particular // Datum and/or Schema. IsBound() bool // IsScalarExpr returns true if this expression is composed only of scalar // literals, field references and calls to scalar functions. IsScalarExpr() bool // IsNullLiteral returns true if this expression is a literal and entirely // null. IsNullLiteral() bool // IsSatisfiable returns true if this expression could evaluate to true IsSatisfiable() bool // FieldRef returns a pointer to the underlying field reference, or nil if // this expression is not a field reference. FieldRef() *FieldRef // Descr returns the shape of this expression will evaluate to including the type // and whether it will be an Array, Scalar, or either. Descr() ValueDescr // Type returns the datatype this expression will evaluate to. Type() arrow.DataType Hash() uint64 Equals(Expression) bool // Bind binds this expression to the given input schema, looking up appropriate // underlying implementations and some expression simplification may be performed // along with implicit casts being inserted. // Any state necessary for execution will be initialized. // // This only works in conjunction with cgo and being able to link against the // C++ libarrow.so compute library. If this was not built with the libarrow compute // support, this will panic. Bind(context.Context, memory.Allocator, *arrow.Schema) (Expression, error) // Release releases the underlying bound C++ memory that is allocated when // a Bind is performed. Any bound expression should get released to ensure // no memory leaks. Release() // contains filtered or unexported methods }
Expression is an interface for mapping one datum to another. An expression is one of:
A literal Datum A reference to a single (potentially nested) field of an input Datum A call to a compute function, with arguments specified by other Expressions
func And ¶
func And(lhs, rhs Expression, ops ...Expression) Expression
And constructs a tree of calls to and_kleene for boolean And logic taking an arbitrary number of values.
func Cast ¶
func Cast(ex Expression, dt arrow.DataType) Expression
func DeserializeExpr ¶
func Equal ¶
func Equal(lhs, rhs Expression) Expression
Equal is a convenience function for the equal function
func Greater ¶
func Greater(lhs, rhs Expression) Expression
Greater is shorthand for NewCall("greater",....)
func GreaterEqual ¶
func GreaterEqual(lhs, rhs Expression) Expression
GreaterEqual is shorthand for NewCall("greater_equal",....)
func IsNull ¶
func IsNull(lhs Expression, nanIsNull bool) Expression
IsNull creates an expression that returns true if the passed in expression is null. Optionally treating NaN as null if desired.
func LessEqual ¶
func LessEqual(lhs, rhs Expression) Expression
LessEqual is shorthand for NewCall("less_equal",....)
func NewCall ¶
func NewCall(name string, args []Expression, opts FunctionOptions) Expression
NewCall constructs an expression that represents a specific function call with the given arguments and options.
func NewFieldRef ¶
func NewFieldRef(field string) Expression
NewFieldRef is shorthand for NewRef(FieldRefName(field))
func NewLiteral ¶
func NewLiteral(arg interface{}) Expression
NewLiteral constructs a new literal expression from any value. It is passed to NewDatum which will construct the appropriate Datum and/or scalar value for the type provided.
func NewRef ¶
func NewRef(ref FieldRef) Expression
NewRef constructs a parameter expression which refers to a specific field
func Not ¶
func Not(expr Expression) Expression
Not creates a call to "invert" for the value specified.
func NullLiteral ¶
func NullLiteral(dt arrow.DataType) Expression
func Or ¶
func Or(lhs, rhs Expression, ops ...Expression) Expression
Or constructs a tree of calls to or_kleene for boolean Or logic taking an arbitrary number of values.
func Project ¶
func Project(values []Expression, names []string) Expression
Project is shorthand for `make_struct` to produce a record batch output from a group of expressions.
type FieldPath ¶
type FieldPath []int
FieldPath represents a path to a nested field using indices of child fields. For example, given the indices {5, 9, 3} the field could be retrieved with: schema.Field(5).Type().(*arrow.StructType).Field(9).Type().(*arrow.StructType).Field(3)
Attempting to retrieve a child field using a FieldPath which is not valid for a given schema will get an error such as an out of range index, or an empty path.
FieldPaths provide for drilling down to potentially nested children for convenience of accepting a slice of fields, a schema or a datatype (which should contain child fields).
A fieldpath can also be used to retrieve a child arrow.Array or column from a record batch.
func (FieldPath) Get ¶
Get retrieves the corresponding nested child field by drilling through the schema's fields as per the field path.
func (FieldPath) GetColumn ¶
GetColumn will return the correct child array by traversing the fieldpath going to the nested arrays of the columns in the record batch.
func (FieldPath) GetFieldFromSlice ¶
GetFieldFromSlice treats the slice as the top layer of fields, so the first value in the field path will index into the slice, and then drill down from there.
func (FieldPath) GetFieldFromType ¶
GetFieldFromType returns the nested field from a datatype by drilling into it's child fields.
type FieldRef ¶
type FieldRef struct {
// contains filtered or unexported fields
}
FieldRef is a descriptor of a (potentially nested) field within a schema.
Unlike FieldPath (which is exclusively indices of child fields), FieldRef may reference a field by name. It can be constructed from either a field index, field name, or field path.
Nested fields can be referenced as well, given the schema:
arrow.NewSchema([]arrow.Field{ {Name: "a", Type: arrow.StructOf(arrow.Field{Name: "n", Type: arrow.Null})}, {Name: "b", Type: arrow.PrimitiveTypes.Int32}, })
the following all indicate the nested field named "n":
FieldRefPath(FieldPath{0, 0}) FieldRefList("a", 0) FieldRefList("a", "n") FieldRefList(0, "n") NewFieldRefFromDotPath(".a[0]")
FieldPaths matching a FieldRef are retrieved with the FindAll* functions Multiple matches are possible because field names may be duplicated within a schema. For example:
aIsAmbiguous := arrow.NewSchema([]arrow.Field{ {Name: "a", Type: arrow.PrimitiveTypes.Int32}, {Name: "a", Type: arrow.PrimitiveTypes.Float32}, }) matches := FieldRefName("a").FindAll(aIsAmbiguous) assert.Len(matches, 2) assert.True(matches[0].Get(aIsAmbiguous).Equals(aIsAmbiguous.Field(0)) assert.True(matches[1].Get(aIsAmbiguous).Equals(aIsAmbiguous.Field(1))
func FieldRefIndex ¶
FieldRefIndex is a convenience function to construct a FieldPath reference of a single index
func FieldRefList ¶
func FieldRefList(elems ...interface{}) FieldRef
FieldRefList takes an arbitrary number of arguments which can be either strings or ints. This will panic if anything other than a string or int is passed in.
func FieldRefPath ¶
FieldRefPath constructs a FieldRef from a given FieldPath
func NewFieldRefFromDotPath ¶
NewFieldRefFromDotPath parses a dot path into a field ref.
dot_path = '.' name
| '[' digit+ ']' | dot_path+
Examples
".alpha" => FieldRefName("alpha") "[2]" => FieldRefIndex(2) ".beta[3]" => FieldRefList("beta", 3) "[5].gamma.delta[7]" => FieldRefList(5, "gamma", "delta", 7) ".hello world" => FieldRefName("hello world") `.\[y\]\\tho\.\` => FieldRef(`[y]\tho.\`)
Note: when parsing a name, a '\' preceding any other character will be dropped from the resulting name. therefore if a name must contain the characters '.', '\', '[' or ']' then they must be escaped with a preceding '\'.
func (*FieldRef) FieldPath ¶
FieldPath returns the fieldpath that this FieldRef uses, otherwise an empty FieldPath if it's not a FieldPath reference
func (FieldRef) FindAll ¶
FindAll returns all the fieldpaths which this FieldRef matches in the given slice of fields.
func (FieldRef) FindAllField ¶
FindAllField returns all the fieldpaths that this FieldRef matches against the type of the given field.
func (FieldRef) FindOne ¶
FindOne returns an error if the field isn't matched or if there are multiple matches otherwise it returns the path to the single valid match.
func (FieldRef) FindOneOrNone ¶
FindOneOrNone is a convenience helper that will either return 1 fieldpath, or an empty fieldpath, and will return an error if there are multiple matches.
func (FieldRef) FindOneOrNoneRecord ¶
FindOneOrNoneRecord is like FindOneOrNone but for the schema of a record, returning an error only if there are multiple matches.
func (FieldRef) GetAllColumns ¶
GetAllColumns gets all the matching column arrays from the given record that this FieldRef references.
func (FieldRef) GetOneColumnOrNone ¶
GetOneColumnOrNone returns either a nil or the referenced array if it can be found, erroring only if there is an ambiguous multiple matches.
func (FieldRef) GetOneField ¶
GetOneField will return a pointer to a field or an error if it is not found or if there are multiple matches.
func (FieldRef) GetOneOrNone ¶
GetOneOrNone will return a field or a nil if the field is found or not, and only errors if there are multiple matches.
func (FieldRef) Hash ¶
Hash produces a hash of this field reference and takes in a seed so that it can maintain consistency across multiple places / processes /etc.
func (*FieldRef) IsFieldPath ¶
IsFieldPath returns true if this FieldRef uses a fieldpath
func (*FieldRef) IsNested ¶
IsNested returns true if this FieldRef expects to represent a nested field.
type FilterOptions ¶
type FilterOptions struct {
NullSelection NullSelectionBehavior `compute:"null_selection_behavior"`
}
func (FilterOptions) TypeName ¶
func (FilterOptions) TypeName() string
type FunctionOptions ¶
type FunctionOptions interface {
TypeName() string
}
FunctionOptions can be any type which has a TypeName function. The fields of the type will be used (via reflection) to determine the information to propagate when serializing to pass to the C++ for execution.
type FunctionOptionsEqual ¶
type FunctionOptionsEqual interface {
Equals(FunctionOptions) bool
}
type Literal ¶
type Literal struct { Literal Datum // contains filtered or unexported fields }
Literal is an expression denoting a literal Datum which could be any value as a scalar, an array, or so on.
func (*Literal) Descr ¶
func (l *Literal) Descr() ValueDescr
func (*Literal) Equals ¶
func (l *Literal) Equals(other Expression) bool
func (*Literal) IsNullLiteral ¶
func (*Literal) IsSatisfiable ¶
func (*Literal) IsScalarExpr ¶
type MakeStructOptions ¶
type MakeStructOptions struct { FieldNames []string `compute:"field_names"` FieldNullability []bool `compute:"field_nullability"` FieldMetadata []*arrow.Metadata `compute:"field_metadata"` }
func (MakeStructOptions) TypeName ¶
func (MakeStructOptions) TypeName() string
type NullOptions ¶
type NullOptions struct {
NanIsNull bool `compute:"nan_is_null"`
}
func (NullOptions) TypeName ¶
func (NullOptions) TypeName() string
type NullSelectionBehavior ¶
type NullSelectionBehavior int8
const ( DropNulls NullSelectionBehavior = iota EmitNulls )
type Parameter ¶
type Parameter struct {
// contains filtered or unexported fields
}
Parameter represents a field reference and needs to be bound in order to determine its type and shape.
func (*Parameter) Descr ¶
func (p *Parameter) Descr() ValueDescr
func (*Parameter) Equals ¶
func (p *Parameter) Equals(other Expression) bool
func (Parameter) IsNullLiteral ¶
func (*Parameter) IsSatisfiable ¶
func (*Parameter) IsScalarExpr ¶
type RecordDatum ¶
RecordDatum contains an array.Record for passing a full record to an expression or to compute.
func (*RecordDatum) Equals ¶
func (r *RecordDatum) Equals(other Datum) bool
func (RecordDatum) Kind ¶
func (RecordDatum) Kind() DatumKind
func (*RecordDatum) Len ¶
func (r *RecordDatum) Len() int64
func (*RecordDatum) Release ¶
func (r *RecordDatum) Release()
func (*RecordDatum) Schema ¶
func (r *RecordDatum) Schema() *arrow.Schema
func (RecordDatum) String ¶
func (RecordDatum) String() string
type ScalarDatum ¶
ScalarDatum contains a scalar value
func (ScalarDatum) Chunks ¶
func (ScalarDatum) Chunks() []arrow.Array
func (*ScalarDatum) Descr ¶
func (d *ScalarDatum) Descr() ValueDescr
func (*ScalarDatum) Equals ¶
func (d *ScalarDatum) Equals(other Datum) bool
func (ScalarDatum) Kind ¶
func (ScalarDatum) Kind() DatumKind
func (ScalarDatum) Len ¶
func (ScalarDatum) Len() int64
func (*ScalarDatum) NullN ¶
func (d *ScalarDatum) NullN() int64
func (*ScalarDatum) Release ¶
func (d *ScalarDatum) Release()
func (ScalarDatum) Shape ¶
func (ScalarDatum) Shape() ValueShape
func (*ScalarDatum) String ¶
func (d *ScalarDatum) String() string
func (*ScalarDatum) Type ¶
func (d *ScalarDatum) Type() arrow.DataType
type SetLookupOptions ¶
type SetLookupOptions struct { ValueSet Datum `compute:"value_set"` SkipNulls bool `compute:"skip_nulls"` }
func (*SetLookupOptions) Equals ¶
func (s *SetLookupOptions) Equals(other FunctionOptions) bool
func (*SetLookupOptions) FromStructScalar ¶
func (s *SetLookupOptions) FromStructScalar(sc *scalar.Struct) error
func (*SetLookupOptions) Release ¶
func (s *SetLookupOptions) Release()
func (SetLookupOptions) TypeName ¶
func (SetLookupOptions) TypeName() string
type StrptimeOptions ¶
type StrptimeOptions struct { Format string `compute:"format"` Unit arrow.TimeUnit `compute:"unit"` }
func (StrptimeOptions) TypeName ¶
func (StrptimeOptions) TypeName() string
type TableDatum ¶
TableDatum contains a table so that multiple record batches can be worked with together as a single table for being passed to compute and expression handling.
func (*TableDatum) Equals ¶
func (d *TableDatum) Equals(other Datum) bool
func (TableDatum) Kind ¶
func (TableDatum) Kind() DatumKind
func (*TableDatum) Len ¶
func (d *TableDatum) Len() int64
func (*TableDatum) Release ¶
func (d *TableDatum) Release()
func (*TableDatum) Schema ¶
func (d *TableDatum) Schema() *arrow.Schema
func (TableDatum) String ¶
func (TableDatum) String() string
type TableLikeDatum ¶
TableLikeDatum is an interface type for specifying either a RecordBatch or a Table as both contain a schema as opposed to just a single data type.
type ValueDescr ¶
type ValueDescr struct { Shape ValueShape Type arrow.DataType }
ValueDescr is a descriptor type giving both the shape and the datatype of a value but without the data.
func (*ValueDescr) String ¶
func (v *ValueDescr) String() string
type ValueShape ¶
type ValueShape int8
ValueShape is a brief description of the shape of a value (array, scalar or otherwise)
const ( // either Array or Scalar ShapeAny ValueShape = iota // any ShapeArray // array ShapeScalar // scalar )
func (ValueShape) String ¶
func (i ValueShape) String() string