package scalar
import "github.com/apache/arrow/go/v11/arrow/scalar"
Index ¶
- func Append(bldr array.Builder, s Scalar) error
- func AppendSlice(bldr array.Builder, scalars []Scalar) error
- func ApproxEquals(left, right Scalar, opts ...EqualOption) bool
- func Equals(left, right Scalar) bool
- func FromScalar(sc *Struct, val interface{}) error
- func Hash(seed maphash.Seed, s Scalar) uint64
- func MakeArrayFromScalar(sc Scalar, length int, mem memory.Allocator) (arrow.Array, error)
- func MakeArrayOfNull(dt arrow.DataType, length int, mem memory.Allocator) arrow.Array
- type Binary
- func NewBinaryScalar(val *memory.Buffer, typ arrow.DataType) *Binary
- func (b *Binary) Buffer() *memory.Buffer
- func (b *Binary) CastTo(to arrow.DataType) (Scalar, error)
- func (b *Binary) Data() []byte
- func (s Binary) DataType() arrow.DataType
- func (s *Binary) IsValid() bool
- func (b *Binary) Release()
- func (b *Binary) Retain()
- func (b *Binary) String() string
- func (b *Binary) Validate() (err error)
- func (b *Binary) ValidateFull() error
- type BinaryScalar
- type Boolean
- func NewBooleanScalar(val bool) *Boolean
- func (s *Boolean) CastTo(dt arrow.DataType) (Scalar, error)
- func (s *Boolean) Data() []byte
- func (s Boolean) DataType() arrow.DataType
- func (s *Boolean) IsValid() bool
- func (s *Boolean) String() string
- func (s *Boolean) Validate() error
- func (s *Boolean) ValidateFull() error
- type Date32
- func NewDate32Scalar(val arrow.Date32) *Date32
- func (s *Date32) CastTo(to arrow.DataType) (Scalar, error)
- func (s *Date32) Data() []byte
- func (s Date32) DataType() arrow.DataType
- func (s *Date32) IsValid() bool
- func (s *Date32) String() string
- func (s *Date32) Validate() error
- func (s *Date32) ValidateFull() error
- type Date64
- func NewDate64Scalar(val arrow.Date64) *Date64
- func (s *Date64) CastTo(to arrow.DataType) (Scalar, error)
- func (s *Date64) Data() []byte
- func (s Date64) DataType() arrow.DataType
- func (s *Date64) IsValid() bool
- func (s *Date64) String() string
- func (s *Date64) Validate() error
- func (s *Date64) ValidateFull() error
- type DateScalar
- type DayTimeInterval
- func NewDayTimeIntervalScalar(val arrow.DayTimeInterval) *DayTimeInterval
- func (s *DayTimeInterval) CastTo(to arrow.DataType) (Scalar, error)
- func (s *DayTimeInterval) Data() []byte
- func (s DayTimeInterval) DataType() arrow.DataType
- func (s *DayTimeInterval) IsValid() bool
- func (s *DayTimeInterval) String() string
- func (s *DayTimeInterval) Validate() error
- func (s *DayTimeInterval) ValidateFull() error
- type Decimal128
- func NewDecimal128Scalar(val decimal128.Num, typ arrow.DataType) *Decimal128
- func (s *Decimal128) CastTo(to arrow.DataType) (Scalar, error)
- func (s *Decimal128) Data() []byte
- func (s Decimal128) DataType() arrow.DataType
- func (s *Decimal128) IsValid() bool
- func (s *Decimal128) String() string
- func (s *Decimal128) Validate() error
- func (s *Decimal128) ValidateFull() error
- type Decimal256
- func NewDecimal256Scalar(val decimal256.Num, typ arrow.DataType) *Decimal256
- func (s *Decimal256) CastTo(to arrow.DataType) (Scalar, error)
- func (s *Decimal256) Data() []byte
- func (s Decimal256) DataType() arrow.DataType
- func (s *Decimal256) IsValid() bool
- func (s *Decimal256) String() string
- func (s *Decimal256) Validate() error
- func (s *Decimal256) ValidateFull() error
- type DenseUnion
- func NewDenseUnionScalar(v Scalar, code arrow.UnionTypeCode, dt *arrow.DenseUnionType) *DenseUnion
- func (s *DenseUnion) CastTo(to arrow.DataType) (Scalar, error)
- func (s *DenseUnion) ChildValue() Scalar
- func (s DenseUnion) DataType() arrow.DataType
- func (s *DenseUnion) IsValid() bool
- func (s *DenseUnion) Release()
- func (s *DenseUnion) Retain()
- func (s *DenseUnion) String() string
- func (s *DenseUnion) Validate() (err error)
- func (s *DenseUnion) ValidateFull() error
- type Dictionary
- func NewDictScalar(index Scalar, dict arrow.Array) *Dictionary
- func NewNullDictScalar(dt arrow.DataType) *Dictionary
- func (s *Dictionary) CastTo(arrow.DataType) (Scalar, error)
- func (s *Dictionary) Data() []byte
- func (s Dictionary) DataType() arrow.DataType
- func (s *Dictionary) GetEncodedValue() (Scalar, error)
- func (s *Dictionary) IsValid() bool
- func (s *Dictionary) Release()
- func (s *Dictionary) Retain()
- func (s *Dictionary) String() string
- func (s *Dictionary) Validate() (err error)
- func (s *Dictionary) ValidateFull() (err error)
- type Duration
- func NewDurationScalar(val arrow.Duration, typ arrow.DataType) *Duration
- func (s *Duration) CastTo(to arrow.DataType) (Scalar, error)
- func (s *Duration) Data() []byte
- func (s Duration) DataType() arrow.DataType
- func (s *Duration) IsValid() bool
- func (s *Duration) String() string
- func (s *Duration) Unit() arrow.TimeUnit
- func (s *Duration) Validate() error
- func (s *Duration) ValidateFull() error
- type EqualOption
- type Extension
- func NewExtensionScalar(storage Scalar, typ arrow.DataType) *Extension
- func (s *Extension) CastTo(to arrow.DataType) (Scalar, error)
- func (s Extension) DataType() arrow.DataType
- func (s *Extension) IsValid() bool
- func (s *Extension) String() string
- func (e *Extension) Validate() (err error)
- func (e *Extension) ValidateFull() error
- type FixedSizeBinary
- func NewFixedSizeBinaryScalar(val *memory.Buffer, typ arrow.DataType) *FixedSizeBinary
- func (s FixedSizeBinary) DataType() arrow.DataType
- func (s FixedSizeBinary) IsValid() bool
- func (b *FixedSizeBinary) Validate() (err error)
- func (b *FixedSizeBinary) ValidateFull() error
- type FixedSizeList
- func NewFixedSizeListScalar(val arrow.Array) *FixedSizeList
- func NewFixedSizeListScalarWithType(val arrow.Array, typ arrow.DataType) *FixedSizeList
- func (s FixedSizeList) DataType() arrow.DataType
- func (s FixedSizeList) IsValid() bool
- func (f *FixedSizeList) Validate() (err error)
- func (f *FixedSizeList) ValidateFull() error
- type Float16
- func NewFloat16Scalar(val float16.Num) *Float16
- func NewFloat16ScalarFromFloat32(val float32) *Float16
- func (f *Float16) CastTo(to arrow.DataType) (Scalar, error)
- func (f *Float16) Data() []byte
- func (s Float16) DataType() arrow.DataType
- func (s *Float16) IsValid() bool
- func (s *Float16) String() string
- func (s *Float16) Validate() error
- func (s *Float16) ValidateFull() error
- type Float32
- func NewFloat32Scalar(val float32) *Float32
- func (s *Float32) CastTo(dt arrow.DataType) (Scalar, error)
- func (s *Float32) Data() []byte
- func (s Float32) DataType() arrow.DataType
- func (s *Float32) IsValid() bool
- func (s *Float32) String() string
- func (s *Float32) Validate() error
- func (s *Float32) ValidateFull() error
- type Float64
- func NewFloat64Scalar(val float64) *Float64
- func (s *Float64) CastTo(dt arrow.DataType) (Scalar, error)
- func (s *Float64) Data() []byte
- func (s Float64) DataType() arrow.DataType
- func (s *Float64) IsValid() bool
- func (s *Float64) String() string
- func (s *Float64) Validate() error
- func (s *Float64) ValidateFull() error
- type Int16
- func NewInt16Scalar(val int16) *Int16
- func (s *Int16) CastTo(dt arrow.DataType) (Scalar, error)
- func (s *Int16) Data() []byte
- func (s Int16) DataType() arrow.DataType
- func (s *Int16) IsValid() bool
- func (s *Int16) String() string
- func (s *Int16) Validate() error
- func (s *Int16) ValidateFull() error
- type Int32
- func NewInt32Scalar(val int32) *Int32
- func (s *Int32) CastTo(dt arrow.DataType) (Scalar, error)
- func (s *Int32) Data() []byte
- func (s Int32) DataType() arrow.DataType
- func (s *Int32) IsValid() bool
- func (s *Int32) String() string
- func (s *Int32) Validate() error
- func (s *Int32) ValidateFull() error
- type Int64
- func NewInt64Scalar(val int64) *Int64
- func (s *Int64) CastTo(dt arrow.DataType) (Scalar, error)
- func (s *Int64) Data() []byte
- func (s Int64) DataType() arrow.DataType
- func (s *Int64) IsValid() bool
- func (s *Int64) String() string
- func (s *Int64) Validate() error
- func (s *Int64) ValidateFull() error
- type Int8
- func NewInt8Scalar(val int8) *Int8
- func (s *Int8) CastTo(dt arrow.DataType) (Scalar, error)
- func (s *Int8) Data() []byte
- func (s Int8) DataType() arrow.DataType
- func (s *Int8) IsValid() bool
- func (s *Int8) String() string
- func (s *Int8) Validate() error
- func (s *Int8) ValidateFull() error
- type IntervalScalar
- type LargeBinary
- func NewLargeBinaryScalar(val *memory.Buffer) *LargeBinary
- func (s LargeBinary) DataType() arrow.DataType
- func (s LargeBinary) IsValid() bool
- type LargeList
- func NewLargeListScalar(val arrow.Array) *LargeList
- func NewLargeListScalarData(val arrow.ArrayData) *LargeList
- func (s LargeList) DataType() arrow.DataType
- func (s LargeList) IsValid() bool
- type LargeString
- func NewLargeStringScalar(val string) *LargeString
- func NewLargeStringScalarFromBuffer(val *memory.Buffer) *LargeString
- type List
- func NewListScalar(val arrow.Array) *List
- func NewListScalarData(val arrow.ArrayData) *List
- func (l *List) CastTo(to arrow.DataType) (Scalar, error)
- func (s List) DataType() arrow.DataType
- func (l *List) GetList() arrow.Array
- func (s *List) IsValid() bool
- func (l *List) Release()
- func (l *List) Retain()
- func (l *List) String() string
- func (l *List) Validate() (err error)
- func (l *List) ValidateFull() error
- type ListScalar
- type Map
- func NewMapScalar(val arrow.Array) *Map
- func (s Map) DataType() arrow.DataType
- func (s Map) IsValid() bool
- type MonthDayNanoInterval
- func NewMonthDayNanoIntervalScalar(val arrow.MonthDayNanoInterval) *MonthDayNanoInterval
- func (s *MonthDayNanoInterval) CastTo(to arrow.DataType) (Scalar, error)
- func (s *MonthDayNanoInterval) Data() []byte
- func (s MonthDayNanoInterval) DataType() arrow.DataType
- func (s *MonthDayNanoInterval) IsValid() bool
- func (s *MonthDayNanoInterval) String() string
- func (s *MonthDayNanoInterval) Validate() error
- func (s *MonthDayNanoInterval) ValidateFull() error
- type MonthInterval
- func NewMonthIntervalScalar(val arrow.MonthInterval) *MonthInterval
- func (s *MonthInterval) CastTo(to arrow.DataType) (Scalar, error)
- func (s *MonthInterval) Data() []byte
- func (s MonthInterval) DataType() arrow.DataType
- func (s *MonthInterval) IsValid() bool
- func (s *MonthInterval) String() string
- func (s *MonthInterval) Validate() error
- func (s *MonthInterval) ValidateFull() error
- type Null
- func (n *Null) CastTo(dt arrow.DataType) (Scalar, error)
- func (s Null) DataType() arrow.DataType
- func (s *Null) IsValid() bool
- func (s *Null) String() string
- func (n *Null) Validate() (err error)
- func (n *Null) ValidateFull() error
- type PrimitiveScalar
- type Releasable
- type Scalar
- func GetScalar(arr arrow.Array, idx int) (Scalar, error)
- func MakeIntegerScalar(v int64, bitsize int) (Scalar, error)
- func MakeNullScalar(dt arrow.DataType) Scalar
- func MakeScalar(val interface{}) Scalar
- func MakeScalarParam(val interface{}, dt arrow.DataType) (Scalar, error)
- func MakeUnsignedIntegerScalar(v uint64, bitsize int) (Scalar, error)
- func ParseScalar(dt arrow.DataType, val string) (Scalar, error)
- func ToScalar(val interface{}, mem memory.Allocator) (Scalar, error)
- type SparseUnion
- func NewSparseUnionScalar(val []Scalar, code arrow.UnionTypeCode, dt *arrow.SparseUnionType) *SparseUnion
- func NewSparseUnionScalarFromValue(val Scalar, idx int, dt *arrow.SparseUnionType) *SparseUnion
- func (s *SparseUnion) CastTo(to arrow.DataType) (Scalar, error)
- func (s *SparseUnion) ChildValue() Scalar
- func (s SparseUnion) DataType() arrow.DataType
- func (s *SparseUnion) IsValid() bool
- func (s *SparseUnion) Release()
- func (s *SparseUnion) Retain()
- func (s *SparseUnion) String() string
- func (s *SparseUnion) Validate() (err error)
- func (s *SparseUnion) ValidateFull() (err error)
- type String
- func NewStringScalar(val string) *String
- func NewStringScalarFromBuffer(val *memory.Buffer) *String
- func (s *String) CastTo(to arrow.DataType) (Scalar, error)
- func (s String) DataType() arrow.DataType
- func (s String) IsValid() bool
- func (s *String) Validate() error
- func (s *String) ValidateFull() (err error)
- type Struct
- func NewStructScalar(val []Scalar, typ arrow.DataType) *Struct
- func NewStructScalarWithNames(val []Scalar, names []string) (*Struct, error)
- func (s *Struct) CastTo(to arrow.DataType) (Scalar, error)
- func (s Struct) DataType() arrow.DataType
- func (s *Struct) Field(name string) (Scalar, error)
- func (s *Struct) IsValid() bool
- func (s *Struct) Release()
- func (s *Struct) String() string
- func (s *Struct) Validate() (err error)
- func (s *Struct) ValidateFull() (err error)
- type TemporalScalar
- type Time32
- func NewTime32Scalar(val arrow.Time32, typ arrow.DataType) *Time32
- func (s *Time32) CastTo(to arrow.DataType) (Scalar, error)
- func (s *Time32) Data() []byte
- func (s Time32) DataType() arrow.DataType
- func (s *Time32) IsValid() bool
- func (s *Time32) String() string
- func (s *Time32) Unit() arrow.TimeUnit
- func (s *Time32) Validate() error
- func (s *Time32) ValidateFull() error
- type Time64
- func NewTime64Scalar(val arrow.Time64, typ arrow.DataType) *Time64
- func (s *Time64) CastTo(to arrow.DataType) (Scalar, error)
- func (s *Time64) Data() []byte
- func (s Time64) DataType() arrow.DataType
- func (s *Time64) IsValid() bool
- func (s *Time64) String() string
- func (s *Time64) Unit() arrow.TimeUnit
- func (s *Time64) Validate() error
- func (s *Time64) ValidateFull() error
- type TimeScalar
- type Timestamp
- func NewTimestampScalar(val arrow.Timestamp, typ arrow.DataType) *Timestamp
- func (s *Timestamp) CastTo(to arrow.DataType) (Scalar, error)
- func (s *Timestamp) Data() []byte
- func (s Timestamp) DataType() arrow.DataType
- func (s *Timestamp) IsValid() bool
- func (s *Timestamp) String() string
- func (s *Timestamp) Unit() arrow.TimeUnit
- func (s *Timestamp) Validate() error
- func (s *Timestamp) ValidateFull() error
- type TypeFromScalar
- type TypeToScalar
- type Uint16
- func NewUint16Scalar(val uint16) *Uint16
- func (s *Uint16) CastTo(dt arrow.DataType) (Scalar, error)
- func (s *Uint16) Data() []byte
- func (s Uint16) DataType() arrow.DataType
- func (s *Uint16) IsValid() bool
- func (s *Uint16) String() string
- func (s *Uint16) Validate() error
- func (s *Uint16) ValidateFull() error
- type Uint32
- func NewUint32Scalar(val uint32) *Uint32
- func (s *Uint32) CastTo(dt arrow.DataType) (Scalar, error)
- func (s *Uint32) Data() []byte
- func (s Uint32) DataType() arrow.DataType
- func (s *Uint32) IsValid() bool
- func (s *Uint32) String() string
- func (s *Uint32) Validate() error
- func (s *Uint32) ValidateFull() error
- type Uint64
- func NewUint64Scalar(val uint64) *Uint64
- func (s *Uint64) CastTo(dt arrow.DataType) (Scalar, error)
- func (s *Uint64) Data() []byte
- func (s Uint64) DataType() arrow.DataType
- func (s *Uint64) IsValid() bool
- func (s *Uint64) String() string
- func (s *Uint64) Validate() error
- func (s *Uint64) ValidateFull() error
- type Uint8
- func NewUint8Scalar(val uint8) *Uint8
- func (s *Uint8) CastTo(dt arrow.DataType) (Scalar, error)
- func (s *Uint8) Data() []byte
- func (s Uint8) DataType() arrow.DataType
- func (s *Uint8) IsValid() bool
- func (s *Uint8) String() string
- func (s *Uint8) Validate() error
- func (s *Uint8) ValidateFull() error
- type Union
- type Vector
Functions ¶
func Append ¶
Append requires the passed in builder and scalar to have the same datatype otherwise it will return an error. Will return arrow.ErrNotImplemented if the type hasn't been implemented for this.
NOTE only available in go1.18+
func AppendSlice ¶
AppendSlice requires the passed in builder and all scalars in the slice to have the same datatype otherwise it will return an error. Will return arrow.ErrNotImplemented if the type hasn't been implemented for this.
NOTE only available in go1.18+
func ApproxEquals ¶
func ApproxEquals(left, right Scalar, opts ...EqualOption) bool
func Equals ¶
Equals returns true if two scalars are equal, which means they have the same datatype, validity and value.
func FromScalar ¶
func Hash ¶
func MakeArrayFromScalar ¶
MakeArrayFromScalar returns an array filled with the scalar value repeated length times. Not yet implemented for nested types such as Struct, List, extension and so on.
func MakeArrayOfNull ¶
MakeArrayOfNull creates an array of size length which is all null of the given data type.
Deprecated: Use array.MakeArrayOfNull
Types ¶
type Binary ¶
func NewBinaryScalar ¶
func (*Binary) Buffer ¶
func (*Binary) CastTo ¶
func (*Binary) Data ¶
func (Binary) DataType ¶
func (*Binary) IsValid ¶
func (s *Binary) IsValid() bool
func (*Binary) Release ¶
func (b *Binary) Release()
func (*Binary) Retain ¶
func (b *Binary) Retain()
func (*Binary) String ¶
func (*Binary) Validate ¶
func (*Binary) ValidateFull ¶
type BinaryScalar ¶
type Boolean ¶
type Boolean struct { Value bool // contains filtered or unexported fields }
func NewBooleanScalar ¶
func (*Boolean) CastTo ¶
func (*Boolean) Data ¶
func (Boolean) DataType ¶
func (*Boolean) IsValid ¶
func (s *Boolean) IsValid() bool
func (*Boolean) String ¶
func (*Boolean) Validate ¶
func (s *Boolean) Validate() error
func (*Boolean) ValidateFull ¶
func (s *Boolean) ValidateFull() error
type Date32 ¶
func NewDate32Scalar ¶
func (*Date32) CastTo ¶
func (*Date32) Data ¶
func (Date32) DataType ¶
func (*Date32) IsValid ¶
func (s *Date32) IsValid() bool
func (*Date32) String ¶
func (*Date32) Validate ¶
func (s *Date32) Validate() error
func (*Date32) ValidateFull ¶
func (s *Date32) ValidateFull() error
type Date64 ¶
func NewDate64Scalar ¶
func (*Date64) CastTo ¶
func (*Date64) Data ¶
func (Date64) DataType ¶
func (*Date64) IsValid ¶
func (s *Date64) IsValid() bool
func (*Date64) String ¶
func (*Date64) Validate ¶
func (s *Date64) Validate() error
func (*Date64) ValidateFull ¶
func (s *Date64) ValidateFull() error
type DateScalar ¶
type DateScalar interface { TemporalScalar // contains filtered or unexported methods }
type DayTimeInterval ¶
type DayTimeInterval struct { Value arrow.DayTimeInterval // contains filtered or unexported fields }
func NewDayTimeIntervalScalar ¶
func NewDayTimeIntervalScalar(val arrow.DayTimeInterval) *DayTimeInterval
func (*DayTimeInterval) CastTo ¶
func (s *DayTimeInterval) CastTo(to arrow.DataType) (Scalar, error)
func (*DayTimeInterval) Data ¶
func (s *DayTimeInterval) Data() []byte
func (DayTimeInterval) DataType ¶
func (*DayTimeInterval) IsValid ¶
func (s *DayTimeInterval) IsValid() bool
func (*DayTimeInterval) String ¶
func (s *DayTimeInterval) String() string
func (*DayTimeInterval) Validate ¶
func (s *DayTimeInterval) Validate() error
func (*DayTimeInterval) ValidateFull ¶
func (s *DayTimeInterval) ValidateFull() error
type Decimal128 ¶
type Decimal128 struct { Value decimal128.Num // contains filtered or unexported fields }
func NewDecimal128Scalar ¶
func NewDecimal128Scalar(val decimal128.Num, typ arrow.DataType) *Decimal128
func (*Decimal128) CastTo ¶
func (s *Decimal128) CastTo(to arrow.DataType) (Scalar, error)
func (*Decimal128) Data ¶
func (s *Decimal128) Data() []byte
func (Decimal128) DataType ¶
func (*Decimal128) IsValid ¶
func (s *Decimal128) IsValid() bool
func (*Decimal128) String ¶
func (s *Decimal128) String() string
func (*Decimal128) Validate ¶
func (s *Decimal128) Validate() error
func (*Decimal128) ValidateFull ¶
func (s *Decimal128) ValidateFull() error
type Decimal256 ¶
type Decimal256 struct { Value decimal256.Num // contains filtered or unexported fields }
func NewDecimal256Scalar ¶
func NewDecimal256Scalar(val decimal256.Num, typ arrow.DataType) *Decimal256
func (*Decimal256) CastTo ¶
func (s *Decimal256) CastTo(to arrow.DataType) (Scalar, error)
func (*Decimal256) Data ¶
func (s *Decimal256) Data() []byte
func (Decimal256) DataType ¶
func (*Decimal256) IsValid ¶
func (s *Decimal256) IsValid() bool
func (*Decimal256) String ¶
func (s *Decimal256) String() string
func (*Decimal256) Validate ¶
func (s *Decimal256) Validate() error
func (*Decimal256) ValidateFull ¶
func (s *Decimal256) ValidateFull() error
type DenseUnion ¶
type DenseUnion struct { TypeCode arrow.UnionTypeCode Value Scalar // contains filtered or unexported fields }
func NewDenseUnionScalar ¶
func NewDenseUnionScalar(v Scalar, code arrow.UnionTypeCode, dt *arrow.DenseUnionType) *DenseUnion
func (*DenseUnion) CastTo ¶
func (s *DenseUnion) CastTo(to arrow.DataType) (Scalar, error)
func (*DenseUnion) ChildValue ¶
func (s *DenseUnion) ChildValue() Scalar
func (DenseUnion) DataType ¶
func (*DenseUnion) IsValid ¶
func (s *DenseUnion) IsValid() bool
func (*DenseUnion) Release ¶
func (s *DenseUnion) Release()
func (*DenseUnion) Retain ¶
func (s *DenseUnion) Retain()
func (*DenseUnion) String ¶
func (s *DenseUnion) String() string
func (*DenseUnion) Validate ¶
func (s *DenseUnion) Validate() (err error)
func (*DenseUnion) ValidateFull ¶
func (s *DenseUnion) ValidateFull() error
type Dictionary ¶
type Dictionary struct { Value struct { Index Scalar Dict arrow.Array } // contains filtered or unexported fields }
func NewDictScalar ¶
func NewDictScalar(index Scalar, dict arrow.Array) *Dictionary
func NewNullDictScalar ¶
func NewNullDictScalar(dt arrow.DataType) *Dictionary
func (*Dictionary) CastTo ¶
func (s *Dictionary) CastTo(arrow.DataType) (Scalar, error)
func (*Dictionary) Data ¶
func (s *Dictionary) Data() []byte
func (Dictionary) DataType ¶
func (*Dictionary) GetEncodedValue ¶
func (s *Dictionary) GetEncodedValue() (Scalar, error)
func (*Dictionary) IsValid ¶
func (s *Dictionary) IsValid() bool
func (*Dictionary) Release ¶
func (s *Dictionary) Release()
func (*Dictionary) Retain ¶
func (s *Dictionary) Retain()
func (*Dictionary) String ¶
func (s *Dictionary) String() string
func (*Dictionary) Validate ¶
func (s *Dictionary) Validate() (err error)
func (*Dictionary) ValidateFull ¶
func (s *Dictionary) ValidateFull() (err error)
type Duration ¶
func NewDurationScalar ¶
func (*Duration) CastTo ¶
func (*Duration) Data ¶
func (Duration) DataType ¶
func (*Duration) IsValid ¶
func (s *Duration) IsValid() bool
func (*Duration) String ¶
func (*Duration) Unit ¶
func (*Duration) Validate ¶
func (s *Duration) Validate() error
func (*Duration) ValidateFull ¶
func (s *Duration) ValidateFull() error
type EqualOption ¶
type EqualOption func(*equalOption)
EqualOption is a functional option type used to configure how Records and Arrays are compared.
func WithAbsTolerance ¶
func WithAbsTolerance(atol float64) EqualOption
WithAbsTolerance configures the comparison functions so that 2 floating point values v1 and v2 are considered equal if |v1-v2| <= atol.
func WithNaNsEqual ¶
func WithNaNsEqual(val bool) EqualOption
WithNaNsEqual configures the comparison functions so that NaNs are considered equal.
type Extension ¶
type Extension struct { Value Scalar // contains filtered or unexported fields }
func NewExtensionScalar ¶
func (*Extension) CastTo ¶
func (Extension) DataType ¶
func (*Extension) IsValid ¶
func (s *Extension) IsValid() bool
func (*Extension) String ¶
func (*Extension) Validate ¶
func (*Extension) ValidateFull ¶
type FixedSizeBinary ¶
type FixedSizeBinary struct { *Binary }
func NewFixedSizeBinaryScalar ¶
func NewFixedSizeBinaryScalar(val *memory.Buffer, typ arrow.DataType) *FixedSizeBinary
func (FixedSizeBinary) DataType ¶
func (FixedSizeBinary) IsValid ¶
func (s FixedSizeBinary) IsValid() bool
func (*FixedSizeBinary) Validate ¶
func (b *FixedSizeBinary) Validate() (err error)
func (*FixedSizeBinary) ValidateFull ¶
func (b *FixedSizeBinary) ValidateFull() error
type FixedSizeList ¶
type FixedSizeList struct { *List }
func NewFixedSizeListScalar ¶
func NewFixedSizeListScalar(val arrow.Array) *FixedSizeList
func NewFixedSizeListScalarWithType ¶
func NewFixedSizeListScalarWithType(val arrow.Array, typ arrow.DataType) *FixedSizeList
func (FixedSizeList) DataType ¶
func (FixedSizeList) IsValid ¶
func (s FixedSizeList) IsValid() bool
func (*FixedSizeList) Validate ¶
func (f *FixedSizeList) Validate() (err error)
func (*FixedSizeList) ValidateFull ¶
func (f *FixedSizeList) ValidateFull() error
type Float16 ¶
func NewFloat16Scalar ¶
func NewFloat16ScalarFromFloat32 ¶
func (*Float16) CastTo ¶
func (*Float16) Data ¶
func (Float16) DataType ¶
func (*Float16) IsValid ¶
func (s *Float16) IsValid() bool
func (*Float16) String ¶
func (*Float16) Validate ¶
func (s *Float16) Validate() error
func (*Float16) ValidateFull ¶
func (s *Float16) ValidateFull() error
type Float32 ¶
type Float32 struct { Value float32 // contains filtered or unexported fields }
func NewFloat32Scalar ¶
func (*Float32) CastTo ¶
func (*Float32) Data ¶
func (Float32) DataType ¶
func (*Float32) IsValid ¶
func (s *Float32) IsValid() bool
func (*Float32) String ¶
func (*Float32) Validate ¶
func (s *Float32) Validate() error
func (*Float32) ValidateFull ¶
func (s *Float32) ValidateFull() error
type Float64 ¶
type Float64 struct { Value float64 // contains filtered or unexported fields }
func NewFloat64Scalar ¶
func (*Float64) CastTo ¶
func (*Float64) Data ¶
func (Float64) DataType ¶
func (*Float64) IsValid ¶
func (s *Float64) IsValid() bool
func (*Float64) String ¶
func (*Float64) Validate ¶
func (s *Float64) Validate() error
func (*Float64) ValidateFull ¶
func (s *Float64) ValidateFull() error
type Int16 ¶
type Int16 struct { Value int16 // contains filtered or unexported fields }
func NewInt16Scalar ¶
func (*Int16) CastTo ¶
func (*Int16) Data ¶
func (Int16) DataType ¶
func (*Int16) IsValid ¶
func (s *Int16) IsValid() bool
func (*Int16) String ¶
func (*Int16) Validate ¶
func (s *Int16) Validate() error
func (*Int16) ValidateFull ¶
func (s *Int16) ValidateFull() error
type Int32 ¶
type Int32 struct { Value int32 // contains filtered or unexported fields }
func NewInt32Scalar ¶
func (*Int32) CastTo ¶
func (*Int32) Data ¶
func (Int32) DataType ¶
func (*Int32) IsValid ¶
func (s *Int32) IsValid() bool
func (*Int32) String ¶
func (*Int32) Validate ¶
func (s *Int32) Validate() error
func (*Int32) ValidateFull ¶
func (s *Int32) ValidateFull() error
type Int64 ¶
type Int64 struct { Value int64 // contains filtered or unexported fields }
func NewInt64Scalar ¶
func (*Int64) CastTo ¶
func (*Int64) Data ¶
func (Int64) DataType ¶
func (*Int64) IsValid ¶
func (s *Int64) IsValid() bool
func (*Int64) String ¶
func (*Int64) Validate ¶
func (s *Int64) Validate() error
func (*Int64) ValidateFull ¶
func (s *Int64) ValidateFull() error
type Int8 ¶
type Int8 struct { Value int8 // contains filtered or unexported fields }
func NewInt8Scalar ¶
func (*Int8) CastTo ¶
func (*Int8) Data ¶
func (Int8) DataType ¶
func (*Int8) IsValid ¶
func (s *Int8) IsValid() bool
func (*Int8) String ¶
func (*Int8) Validate ¶
func (s *Int8) Validate() error
func (*Int8) ValidateFull ¶
func (s *Int8) ValidateFull() error
type IntervalScalar ¶
type IntervalScalar interface { TemporalScalar // contains filtered or unexported methods }
type LargeBinary ¶
type LargeBinary struct { *Binary }
func NewLargeBinaryScalar ¶
func NewLargeBinaryScalar(val *memory.Buffer) *LargeBinary
func (LargeBinary) DataType ¶
func (LargeBinary) IsValid ¶
func (s LargeBinary) IsValid() bool
type LargeList ¶
type LargeList struct { *List }
func NewLargeListScalar ¶
func NewLargeListScalarData ¶
func (LargeList) DataType ¶
func (LargeList) IsValid ¶
func (s LargeList) IsValid() bool
type LargeString ¶
type LargeString struct {
// contains filtered or unexported fields
}
func NewLargeStringScalar ¶
func NewLargeStringScalar(val string) *LargeString
func NewLargeStringScalarFromBuffer ¶
func NewLargeStringScalarFromBuffer(val *memory.Buffer) *LargeString
type List ¶
func NewListScalar ¶
func NewListScalarData ¶
func (*List) CastTo ¶
func (List) DataType ¶
func (*List) GetList ¶
func (*List) IsValid ¶
func (s *List) IsValid() bool
func (*List) Release ¶
func (l *List) Release()
func (*List) Retain ¶
func (l *List) Retain()
func (*List) String ¶
func (*List) Validate ¶
func (*List) ValidateFull ¶
type ListScalar ¶
type Map ¶
type Map struct { *List }
func NewMapScalar ¶
func (Map) DataType ¶
func (Map) IsValid ¶
func (s Map) IsValid() bool
type MonthDayNanoInterval ¶
type MonthDayNanoInterval struct { Value arrow.MonthDayNanoInterval // contains filtered or unexported fields }
func NewMonthDayNanoIntervalScalar ¶
func NewMonthDayNanoIntervalScalar(val arrow.MonthDayNanoInterval) *MonthDayNanoInterval
func (*MonthDayNanoInterval) CastTo ¶
func (s *MonthDayNanoInterval) CastTo(to arrow.DataType) (Scalar, error)
func (*MonthDayNanoInterval) Data ¶
func (s *MonthDayNanoInterval) Data() []byte
func (MonthDayNanoInterval) DataType ¶
func (*MonthDayNanoInterval) IsValid ¶
func (s *MonthDayNanoInterval) IsValid() bool
func (*MonthDayNanoInterval) String ¶
func (s *MonthDayNanoInterval) String() string
func (*MonthDayNanoInterval) Validate ¶
func (s *MonthDayNanoInterval) Validate() error
func (*MonthDayNanoInterval) ValidateFull ¶
func (s *MonthDayNanoInterval) ValidateFull() error
type MonthInterval ¶
type MonthInterval struct { Value arrow.MonthInterval // contains filtered or unexported fields }
func NewMonthIntervalScalar ¶
func NewMonthIntervalScalar(val arrow.MonthInterval) *MonthInterval
func (*MonthInterval) CastTo ¶
func (s *MonthInterval) CastTo(to arrow.DataType) (Scalar, error)
func (*MonthInterval) Data ¶
func (s *MonthInterval) Data() []byte
func (MonthInterval) DataType ¶
func (*MonthInterval) IsValid ¶
func (s *MonthInterval) IsValid() bool
func (*MonthInterval) String ¶
func (s *MonthInterval) String() string
func (*MonthInterval) Validate ¶
func (s *MonthInterval) Validate() error
func (*MonthInterval) ValidateFull ¶
func (s *MonthInterval) ValidateFull() error
type Null ¶
type Null struct {
// contains filtered or unexported fields
}
func (*Null) CastTo ¶
func (Null) DataType ¶
func (*Null) IsValid ¶
func (s *Null) IsValid() bool
func (*Null) String ¶
func (s *Null) String() string
func (*Null) Validate ¶
func (*Null) ValidateFull ¶
type PrimitiveScalar ¶
type Releasable ¶
type Releasable interface { Release() Retain() }
type Scalar ¶
type Scalar interface { fmt.Stringer // IsValid returns true if the value is non-null, otherwise false. IsValid() bool // The datatype of the value in this scalar DataType() arrow.DataType // Performs cheap validation checks, returns nil if successful Validate() error // Perform more expensive validation checks, returns nil if successful ValidateFull() error // Cast the value to the desired DataType (returns an error if unable to do so) // should take semantics into account and modify the value accordingly. CastTo(arrow.DataType) (Scalar, error) // contains filtered or unexported methods }
Scalar represents a single value of a specific DataType as opposed to an array.
Scalars are useful for passing single value inputs to compute functions (not yet implemented) or for representing individual array elements, (with a non-trivial cost though).
func GetScalar ¶
GetScalar creates a scalar object from the value at a given index in the passed in array, returns an error if unable to do so.
func MakeIntegerScalar ¶
MakeIntegerScalar is a helper function for creating an integer scalar of a given bitsize.
func MakeNullScalar ¶
MakeNullScalar creates a scalar value of the desired type representing a null value
func MakeScalar ¶
func MakeScalar(val interface{}) Scalar
MakeScalar creates a scalar of the passed in type via reflection.
func MakeScalarParam ¶
MakeScalarParam is for converting a value to a scalar when it requires a parameterized data type such as a time type that needs units, or a fixed size list which needs it's size.
Will fall back to MakeScalar without the passed in type if not one of the parameterized types.
func MakeUnsignedIntegerScalar ¶
MakeUnsignedIntegerScalar is a helper function for creating an unsigned int scalar of the specified bit width.
func ParseScalar ¶
ParseScalar parses a string to create a scalar of the passed in type. Currently does not support any nested types such as Structs or Lists.
func ToScalar ¶
type SparseUnion ¶
type SparseUnion struct { TypeCode arrow.UnionTypeCode Value []Scalar ChildID int // contains filtered or unexported fields }
func NewSparseUnionScalar ¶
func NewSparseUnionScalar(val []Scalar, code arrow.UnionTypeCode, dt *arrow.SparseUnionType) *SparseUnion
func NewSparseUnionScalarFromValue ¶
func NewSparseUnionScalarFromValue(val Scalar, idx int, dt *arrow.SparseUnionType) *SparseUnion
func (*SparseUnion) CastTo ¶
func (s *SparseUnion) CastTo(to arrow.DataType) (Scalar, error)
func (*SparseUnion) ChildValue ¶
func (s *SparseUnion) ChildValue() Scalar
func (SparseUnion) DataType ¶
func (*SparseUnion) IsValid ¶
func (s *SparseUnion) IsValid() bool
func (*SparseUnion) Release ¶
func (s *SparseUnion) Release()
func (*SparseUnion) Retain ¶
func (s *SparseUnion) Retain()
func (*SparseUnion) String ¶
func (s *SparseUnion) String() string
func (*SparseUnion) Validate ¶
func (s *SparseUnion) Validate() (err error)
func (*SparseUnion) ValidateFull ¶
func (s *SparseUnion) ValidateFull() (err error)
type String ¶
type String struct { *Binary }
func NewStringScalar ¶
func NewStringScalarFromBuffer ¶
func (*String) CastTo ¶
func (String) DataType ¶
func (String) IsValid ¶
func (s String) IsValid() bool
func (*String) Validate ¶
func (*String) ValidateFull ¶
type Struct ¶
type Struct struct { Value Vector // contains filtered or unexported fields }
func NewStructScalar ¶
func NewStructScalarWithNames ¶
func (*Struct) CastTo ¶
func (Struct) DataType ¶
func (*Struct) Field ¶
func (*Struct) IsValid ¶
func (s *Struct) IsValid() bool
func (*Struct) Release ¶
func (s *Struct) Release()
func (*Struct) String ¶
func (*Struct) Validate ¶
func (*Struct) ValidateFull ¶
type TemporalScalar ¶
type TemporalScalar interface { Scalar // contains filtered or unexported methods }
type Time32 ¶
func NewTime32Scalar ¶
func (*Time32) CastTo ¶
func (*Time32) Data ¶
func (Time32) DataType ¶
func (*Time32) IsValid ¶
func (s *Time32) IsValid() bool
func (*Time32) String ¶
func (*Time32) Unit ¶
func (*Time32) Validate ¶
func (s *Time32) Validate() error
func (*Time32) ValidateFull ¶
func (s *Time32) ValidateFull() error
type Time64 ¶
func NewTime64Scalar ¶
func (*Time64) CastTo ¶
func (*Time64) Data ¶
func (Time64) DataType ¶
func (*Time64) IsValid ¶
func (s *Time64) IsValid() bool
func (*Time64) String ¶
func (*Time64) Unit ¶
func (*Time64) Validate ¶
func (s *Time64) Validate() error
func (*Time64) ValidateFull ¶
func (s *Time64) ValidateFull() error
type TimeScalar ¶
type TimeScalar interface { TemporalScalar Unit() arrow.TimeUnit // contains filtered or unexported methods }
type Timestamp ¶
func NewTimestampScalar ¶
func (*Timestamp) CastTo ¶
func (*Timestamp) Data ¶
func (Timestamp) DataType ¶
func (*Timestamp) IsValid ¶
func (s *Timestamp) IsValid() bool
func (*Timestamp) String ¶
func (*Timestamp) Unit ¶
func (*Timestamp) Validate ¶
func (s *Timestamp) Validate() error
func (*Timestamp) ValidateFull ¶
func (s *Timestamp) ValidateFull() error
type TypeFromScalar ¶
type TypeToScalar ¶
type Uint16 ¶
type Uint16 struct { Value uint16 // contains filtered or unexported fields }
func NewUint16Scalar ¶
func (*Uint16) CastTo ¶
func (*Uint16) Data ¶
func (Uint16) DataType ¶
func (*Uint16) IsValid ¶
func (s *Uint16) IsValid() bool
func (*Uint16) String ¶
func (*Uint16) Validate ¶
func (s *Uint16) Validate() error
func (*Uint16) ValidateFull ¶
func (s *Uint16) ValidateFull() error
type Uint32 ¶
type Uint32 struct { Value uint32 // contains filtered or unexported fields }
func NewUint32Scalar ¶
func (*Uint32) CastTo ¶
func (*Uint32) Data ¶
func (Uint32) DataType ¶
func (*Uint32) IsValid ¶
func (s *Uint32) IsValid() bool
func (*Uint32) String ¶
func (*Uint32) Validate ¶
func (s *Uint32) Validate() error
func (*Uint32) ValidateFull ¶
func (s *Uint32) ValidateFull() error
type Uint64 ¶
type Uint64 struct { Value uint64 // contains filtered or unexported fields }
func NewUint64Scalar ¶
func (*Uint64) CastTo ¶
func (*Uint64) Data ¶
func (Uint64) DataType ¶
func (*Uint64) IsValid ¶
func (s *Uint64) IsValid() bool
func (*Uint64) String ¶
func (*Uint64) Validate ¶
func (s *Uint64) Validate() error
func (*Uint64) ValidateFull ¶
func (s *Uint64) ValidateFull() error
type Uint8 ¶
type Uint8 struct { Value uint8 // contains filtered or unexported fields }
func NewUint8Scalar ¶
func (*Uint8) CastTo ¶
func (*Uint8) Data ¶
func (Uint8) DataType ¶
func (*Uint8) IsValid ¶
func (s *Uint8) IsValid() bool
func (*Uint8) String ¶
func (*Uint8) Validate ¶
func (s *Uint8) Validate() error
func (*Uint8) ValidateFull ¶
func (s *Uint8) ValidateFull() error
type Union ¶
type Vector ¶
type Vector []Scalar
Source Files ¶
append.go binary.go compare.go nested.go numeric.gen.go parse.go scalar.go temporal.go
- Version
- v11.0.0 (latest)
- Published
- Jan 18, 2023
- Platform
- linux/amd64
- Imports
- 25 packages
- Last checked
- 33 minutes ago –
Tools for package owners.