Documentation ¶
Overview ¶
Package arrow provides a set of utility functions to access Arrow data structures.
Index ¶
- Constants
- Variables
- func BinaryFromArray(arr arrow.Array, row int) ([]byte, error)
- func BinaryFromRecord(record arrow.Record, fieldID int, row int) ([]byte, error)
- func BinaryFromStruct(arr arrow.Array, row int, id int) ([]byte, error)
- func BoolFromArray(arr arrow.Array, row int) (bool, error)
- func BoolFromRecord(record arrow.Record, fieldID int, row int) (bool, error)
- func BoolFromStruct(arr arrow.Array, row int, id int) (bool, error)
- func DataTypeToID(dt arrow.DataType) string
- func DurationFromArray(arr arrow.Array, row int) (arrow.Duration, error)
- func DurationFromRecord(record arrow.Record, fieldID int, row int) (arrow.Duration, error)
- func F64FromArray(arr arrow.Array, row int) (float64, error)
- func F64FromRecord(record arrow.Record, fieldID int, row int) (float64, error)
- func F64FromStruct(arr arrow.Array, row int, id int) (float64, error)
- func F64OrNilFromArray(arr arrow.Array, row int) (*float64, error)
- func F64OrNilFromRecord(record arrow.Record, fieldID int, row int) (*float64, error)
- func FieldIDFromSchema(schema *arrow.Schema, fieldName string) (int, error)
- func FieldIDFromStruct(dt *arrow.StructType, fieldName string) (int, *arrow.DataType)
- func FieldToID(field *arrow.Field) string
- func FixedSizeBinaryFieldByIDFromRecord(record arrow.Record, fieldID int, row int) ([]byte, error)
- func FixedSizeBinaryFromArray(arr arrow.Array, row int) ([]byte, error)
- func FixedSizeBinaryFromRecord(record arrow.Record, fieldID int, row int) ([]byte, error)
- func I32FromArray(arr arrow.Array, row int) (int32, error)
- func I32FromRecord(record arrow.Record, fieldID int, row int) (int32, error)
- func I32FromStruct(arr arrow.Array, row int, id int) (int32, error)
- func I64FromArray(arr arrow.Array, row int) (int64, error)
- func I64FromRecord(record arrow.Record, fieldID int, row int) (int64, error)
- func I64FromStruct(arr arrow.Array, row int, id int) (int64, error)
- func I64OrNilFromRecord(record arrow.Record, fieldID int, row int) (*int64, error)
- func ListOfStructsFieldIDFromSchema(schema *arrow.Schema, fieldName string) (int, *arrow.StructType, error)
- func ListOfStructsFieldIDFromStruct(dt *arrow.StructType, fieldName string) (int, *arrow.StructType, error)
- func ListValuesByIDFromRecord(record arrow.Record, fieldID int, row int) (arr arrow.Array, start int, end int, err error)
- func MandatoryFieldIDFromSchema(schema *arrow.Schema, fieldName string) (int, error)
- func NullableU16FromRecord(record arrow.Record, fieldID int, row int) (*uint16, error)
- func NullableU16FromStruct(structArr *array.Struct, row int, fieldID int) (*uint16, error)
- func NullableU32FromRecord(record arrow.Record, fieldID int, row int) (*uint32, error)
- func OptionalFieldIDFromStruct(dt *arrow.StructType, fieldName string) (id int)
- func PrintRecord(name string, record arrow.Record, maxRows int)
- func PrintRecordWithProgression(name string, record arrow.Record, maxRows, countPrints, maxPrints int)
- func SchemaToID(schema *arrow.Schema) string
- func ShowDataType(dt arrow.DataType, prefix string)
- func ShowField(field *arrow.Field, prefix string)
- func ShowSchema(schema *arrow.Schema, schemaName string, prefix string)
- func StringFromArray(arr arrow.Array, row int) (string, error)
- func StringFromRecord(record arrow.Record, fieldID int, row int) (string, error)
- func StringFromStruct(arr arrow.Array, row int, id int) (string, error)
- func StructFieldIDFromSchema(schema *arrow.Schema, fieldName string) (int, *arrow.StructType, error)
- func StructFieldIDFromStruct(dt *arrow.StructType, fieldName string) (int, *arrow.StructType, error)
- func StructFromRecord(record arrow.Record, fieldID int, row int) (sarr *array.Struct, err error)
- func StructFromSparseUnion(dt *arrow.SparseUnionType, code int8) *arrow.StructType
- func TimestampFromArray(arr arrow.Array, row int) (arrow.Timestamp, error)
- func TimestampFromRecord(record arrow.Record, fieldID int, row int) (arrow.Timestamp, error)
- func U16FromArray(arr arrow.Array, row int) (uint16, error)
- func U16FromRecord(record arrow.Record, fieldID int, row int) (uint16, error)
- func U16FromStruct(structArr *array.Struct, row int, fieldID int) (uint16, error)
- func U32FromArray(arr arrow.Array, row int) (uint32, error)
- func U32FromRecord(record arrow.Record, fieldID int, row int) (uint32, error)
- func U32FromStruct(structArr *array.Struct, row int, fieldID int) (uint32, error)
- func U64FromArray(arr arrow.Array, row int) (uint64, error)
- func U64FromRecord(record arrow.Record, fieldID int, row int) (uint64, error)
- func U8FromArray(arr arrow.Array, row int) (uint8, error)
- func U8FromRecord(record arrow.Record, fieldID int, row int) (uint8, error)
- func U8FromStruct(structArr *array.Struct, row int, fieldID int) (uint8, error)
- type Fields
- type ListOfStructs
- func (los *ListOfStructs) Array() *array.Struct
- func (los *ListOfStructs) BinaryFieldByID(fieldID int, row int) ([]byte, error)
- func (los *ListOfStructs) BinaryFieldByName(name string, row int) ([]byte, error)
- func (los *ListOfStructs) BoolFieldByID(fieldID int, row int) (bool, error)
- func (los *ListOfStructs) BoolFieldByName(name string, row int) (bool, error)
- func (los *ListOfStructs) DataType() *arrow.StructType
- func (los *ListOfStructs) DurationFieldByID(fieldID int, row int) (arrow.Duration, error)
- func (los *ListOfStructs) End() int
- func (los *ListOfStructs) F64FieldByID(fieldID int, row int) (float64, error)
- func (los *ListOfStructs) F64FieldByName(name string, row int) (float64, error)
- func (los *ListOfStructs) F64OrNilFieldByID(fieldID int, row int) (*float64, error)
- func (los *ListOfStructs) Field(name string) (arrow.Array, bool)
- func (los *ListOfStructs) FieldByID(id int) arrow.Array
- func (los *ListOfStructs) FieldIdx(name string) (int, bool)
- func (los *ListOfStructs) FixedSizeBinaryFieldByID(fieldID int, row int) ([]byte, error)
- func (los *ListOfStructs) FixedSizeBinaryFieldByName(name string, row int) ([]byte, error)
- func (los *ListOfStructs) I32FieldByID(fieldID int, row int) (int32, error)
- func (los *ListOfStructs) I32FieldByName(name string, row int) (int32, error)
- func (los *ListOfStructs) I64FieldByID(fieldID int, row int) (int64, error)
- func (los *ListOfStructs) I64FieldByName(name string, row int) (int64, error)
- func (los *ListOfStructs) IsNull(row int) bool
- func (los *ListOfStructs) ListOfStructsById(row int, fieldID int) (*ListOfStructs, error)
- func (los *ListOfStructs) ListValuesById(row int, fieldID int) (arr arrow.Array, start int, end int, err error)
- func (los *ListOfStructs) NullableU16FieldByID(fieldID int, row int) (*uint16, error)
- func (los *ListOfStructs) OptionalTimestampFieldByID(fieldID int, row int) *pcommon.Timestamp
- func (los *ListOfStructs) Start() int
- func (los *ListOfStructs) StringFieldByID(fieldID int, row int) (string, error)
- func (los *ListOfStructs) StringFieldByName(name string, row int) (string, error)
- func (los *ListOfStructs) StructArray(name string, row int) (*arrow.StructType, *array.Struct, error)
- func (los *ListOfStructs) StructByID(fieldID int, row int) (*arrow.StructType, *array.Struct, error)
- func (los *ListOfStructs) TimestampFieldByID(fieldID int, row int) (arrow.Timestamp, error)
- func (los *ListOfStructs) U16FieldByID(fieldID int, row int) (uint16, error)
- func (los *ListOfStructs) U32FieldByID(fieldID int, row int) (uint32, error)
- func (los *ListOfStructs) U32FieldByName(name string, row int) (uint32, error)
- func (los *ListOfStructs) U64FieldByID(fieldID int, row int) (uint64, error)
- func (los *ListOfStructs) U64FieldByName(name string, row int) (uint64, error)
- type SortableField
- type TextColumn
Constants ¶
const ( StrCode int8 = 0 I64Code int8 = 1 F64Code int8 = 2 BoolCode int8 = 3 BinaryCode int8 = 4 CborCode int8 = 5 )
const AbsentFieldID = -1
const BinarySig = "Bin"
const BoolSig = "Bol"
const DenseUnionSig = "DU"
const DictionarySig = "Dic"
const Duration = "Dur" // Duration in nanoseconds.
const F32Sig = "F32"
const F64Sig = "F64"
const FixedSizeBinarySig = "FSB"
const I16Sig = "I16"
const I32Sig = "I32"
const I64Sig = "I64"
const I8Sig = "I8"
const MapSig = "Map"
const SparseUnionSig = "SU"
const StringSig = "Str"
const Timestamp = "Tns" // Timestamp in nanoseconds.
const U16Sig = "U16"
const U32Sig = "U32"
const U64Sig = "U64"
const U8Sig = "U8"
Variables ¶
var ( // ErrInvalidArrayType is returned when an array is not of the expected type. ErrInvalidArrayType = errors.New("invalid arrow array type") // ErrNotStructType is returned when an array is not of type Struct. ErrNotStructType = errors.New("not arrow.StructType") // ErrNotListOfStructsType is returned when an array is not of type List of // structs. ErrNotListOfStructsType = errors.New("not arrow.ListType of arrow.StructType") // ErrNotListType is returned when an array is not of type list. ErrNotListType = errors.New("not an arrow.ListType") // ErrNotArrayStruct is returned when an array is not an array.Struct. ErrNotArrayStruct = errors.New("not an arrow array.Struct") // ErrNotArrayList is returned when an array is not an array.List. ErrNotArrayList = errors.New("not an arrow array.List") // ErrNotArrayListOfStructs is returned when an array is not an array.List // of array.Struct. ErrNotArrayListOfStructs = errors.New("not an Arrow array.List of array.Struct") // ErrDuplicateFieldName is returned when a field name is duplicated in the // same struct. ErrDuplicateFieldName = errors.New("duplicate field name") // ErrMissingFieldName is returned when a field name is missing in a struct. ErrMissingFieldName = errors.New("missing field name") )
Functions ¶
func BinaryFromArray ¶
BinaryFromArray returns the binary value for a specific row in an Arrow array.
func BinaryFromRecord ¶
BinaryFromRecord returns the []byte value for a specific row and column in an Arrow record. If the value is null, it returns nil.
func BinaryFromStruct ¶
BinaryFromStruct returns the []byte value for a specific field+row in an Arrow Array struct.
func BoolFromArray ¶
BoolFromArray returns the bool value for a specific row in an Arrow array.
func BoolFromRecord ¶
BoolFromRecord returns the bool value for a specific row and column in an Arrow record. If the value is null, it returns false.
func BoolFromStruct ¶
BoolFromStruct returns the bool value for a specific field+row in an Arrow Array struct.
func DataTypeToID ¶
DataTypeToID creates a unique id for a data type.
func DurationFromArray ¶
DurationFromArray returns the duration value for a specific row in an Arrow array. This Arrow array can be either a duration array or a dictionary array.
func DurationFromRecord ¶
DurationFromRecord returns the duration value for a specific row and column in an Arrow record.
func F64FromArray ¶
F64FromArray returns the float64 value for a specific row in an Arrow array.
func F64FromRecord ¶
F64FromRecord returns the float64 value for a specific row and column in an Arrow record. If the value is nil, it returns 0.
func F64FromStruct ¶
F64FromStruct returns the float64 value for a specific field+row in an Arrow Array struct.
func F64OrNilFromArray ¶
F64OrNilFromArray returns a pointer to the float64 value for a specific row in an Arrow array or nil if the value is nil.
func F64OrNilFromRecord ¶
F64OrNilFromRecord returns the float64 value for a specific row and column in an Arrow record. Returns nil if the value is nil
func FieldIDFromSchema ¶
FieldIDFromSchema returns the field id of a field from an Arrow schema or -AbsentFieldID for an unknown field.
An error is returned if the field is duplicated.
func FieldIDFromStruct ¶
FieldIDFromStruct returns the field id of a named field from an Arrow struct or AbsentFieldID for an unknown field.
func FixedSizeBinaryFieldByIDFromRecord ¶
FixedSizeBinaryFieldByIDFromRecord returns the fixed size binary value of a field id for a specific row. If the value is null, it returns nil.
func FixedSizeBinaryFromArray ¶
FixedSizeBinaryFromArray returns the fixed size binary value for a specific row in an Arrow array.
func FixedSizeBinaryFromRecord ¶
FixedSizeBinaryFromRecord returns the fixed size binary value of a field id for a specific row.
func I32FromArray ¶
I32FromArray returns the int32 value for a specific row in an Arrow array. This Arrow array can be either an int32 array or a dictionary-encoded array.
func I32FromRecord ¶
I32FromRecord returns the int32 value for a specific row and column in an Arrow record. If the value is null, it returns 0.
func I32FromStruct ¶
I32FromStruct returns the int32 value for a specific field+row in an Arrow Array struct.
func I64FromArray ¶
I64FromArray returns the int64 value for a specific row in an Arrow array. This Arrow array can be either an int64 array or a dictionary-encoded int64 array.
func I64FromRecord ¶
I64FromRecord returns the int64 value for a specific row and column in an Arrow record. If the value is null, it returns 0.
func I64FromStruct ¶
I64FromStruct returns the int64 value for a specific field+row in an Arrow Array struct.
func I64OrNilFromRecord ¶
I64OrNilFromRecord returns the int64 value for a specific row and column in an Arrow record. If the value is nil, it returns nil.
func ListOfStructsFieldIDFromSchema ¶
func ListOfStructsFieldIDFromSchema(schema *arrow.Schema, fieldName string) (int, *arrow.StructType, error)
ListOfStructsFieldIDFromSchema returns the field id of a list of structs field from an Arrow schema or AbsentFieldID for an unknown field.
An error is returned if the field is not a list of structs.
func ListOfStructsFieldIDFromStruct ¶
func ListOfStructsFieldIDFromStruct(dt *arrow.StructType, fieldName string) (int, *arrow.StructType, error)
ListOfStructsFieldIDFromStruct returns the field id of a list of structs field from an Arrow struct or AbsentFieldID if the field is not found.
An error is returned if the field is not a list of structs.
func ListValuesByIDFromRecord ¶
func ListValuesByIDFromRecord(record arrow.Record, fieldID int, row int) (arr arrow.Array, start int, end int, err error)
ListValuesByIDFromRecord return the list array for a field id for a specific row.
func MandatoryFieldIDFromSchema ¶
MandatoryFieldIDFromSchema returns the field id of a field from an Arrow schema or an error if the field is not present or duplicated.
func NullableU16FromRecord ¶
NullableU16FromRecord returns the uint16 value for a specific row and column in an Arrow record. If the value is null, it returns nil.
func NullableU16FromStruct ¶
NullableU16FromStruct returns a reference to an uint16 value for a specific row in an Arrow struct or nil if the field doesn't exist.
func NullableU32FromRecord ¶
NullableU32FromRecord returns the uint32 value for a specific row and column in an Arrow record. If the value is null, it returns nil.
func OptionalFieldIDFromStruct ¶
func OptionalFieldIDFromStruct(dt *arrow.StructType, fieldName string) (id int)
OptionalFieldIDFromStruct returns the field id of a named field from an Arrow struct or AbsentFieldID if the field is unknown.
func PrintRecord ¶
PrintRecord prints the contents of an Arrow record to stdout.
func PrintRecordWithProgression ¶ added in v0.5.0
func PrintRecordWithProgression(name string, record arrow.Record, maxRows, countPrints, maxPrints int)
PrintRecordWithProgression prints the contents of an Arrow record to stdout.
func SchemaToID ¶
SchemaToID creates a unique id for a schema. Fields are sorted by name before creating the id (done at each nested level).
func ShowDataType ¶
func StringFromArray ¶
StringFromArray returns the string value for a specific row in an Arrow array.
func StringFromRecord ¶
StringFromRecord returns the string value for a specific row and column in an Arrow record. If the value is null, it returns an empty string.
func StringFromStruct ¶
StringFromStruct returns the string value for a specific row in an Arrow struct.
func StructFieldIDFromSchema ¶
func StructFieldIDFromSchema(schema *arrow.Schema, fieldName string) (int, *arrow.StructType, error)
StructFieldIDFromSchema returns the field id of a struct field from an Arrow schema or AbsentFieldID for an unknown field.
An error is returned if the field is not a struct.
func StructFieldIDFromStruct ¶
func StructFieldIDFromStruct(dt *arrow.StructType, fieldName string) (int, *arrow.StructType, error)
StructFieldIDFromStruct returns the field id of a struct field from an Arrow struct or AbsentFieldID for an unknown field.
An error is returned if the field is not a struct.
func StructFromRecord ¶
StructFromRecord returns the struct array for a specific row and column in an Arrow record. If the value is null, it returns nil.
func StructFromSparseUnion ¶
func StructFromSparseUnion(dt *arrow.SparseUnionType, code int8) *arrow.StructType
func TimestampFromArray ¶
TimestampFromArray returns the timestamp value for a specific row in an Arrow array.
func TimestampFromRecord ¶
TimestampFromRecord returns the timestamp value for a specific row and column in an Arrow record. If the value is null, it returns 0.
func U16FromArray ¶
U16FromArray returns the uint16 value for a specific row in an Arrow array.
func U16FromRecord ¶
U16FromRecord returns the uint16 value for a specific row and column in an Arrow record. If the value is null, it returns 0.
func U16FromStruct ¶
U16FromStruct returns the uint16 value for a specific row in an Arrow struct or 0 if the field doesn't exist.
func U32FromArray ¶
U32FromArray returns the uint32 value for a specific row in an Arrow array.
func U32FromRecord ¶
U32FromRecord returns the uint32 value for a specific row and column in an Arrow record. If the value is null, it returns 0.
func U32FromStruct ¶
U32FromStruct returns the uint32 value for a specific row in an Arrow struct or 0 if the field doesn't exist.
func U64FromArray ¶
U64FromArray returns the uint64 value for a specific row in an Arrow array.
func U64FromRecord ¶
U64FromRecord returns the uint64 value for a specific row and column in an Arrow record. If the value is null, it returns 0.
func U8FromArray ¶
U8FromArray returns the uint8 value for a specific row in an Arrow array.
func U8FromRecord ¶
U8FromRecord returns the uint8 value for a specific row and column in an Arrow record. If the value is null, it returns 0.
Types ¶
type Fields ¶
type Fields []SortableField
type ListOfStructs ¶
type ListOfStructs struct {
// contains filtered or unexported fields
}
ListOfStructs is a wrapper around an Arrow list of structs used to expose utility functions.
func ListOfStructsFromArray ¶
func ListOfStructsFromArray(arr arrow.Array, row int) (*ListOfStructs, error)
func ListOfStructsFromRecord ¶
ListOfStructsFromRecord returns the struct type and an array of structs for a given field id.
func ListOfStructsFromStruct ¶
ListOfStructsFromStruct return a ListOfStructs from a struct field.
func (*ListOfStructs) Array ¶
func (los *ListOfStructs) Array() *array.Struct
Array returns the underlying arrow array.
func (*ListOfStructs) BinaryFieldByID ¶
func (los *ListOfStructs) BinaryFieldByID(fieldID int, row int) ([]byte, error)
BinaryFieldByID returns the binary value of a field id for a specific row.
func (*ListOfStructs) BinaryFieldByName ¶
func (los *ListOfStructs) BinaryFieldByName(name string, row int) ([]byte, error)
BinaryFieldByName returns the binary value of a named field for a specific row.
func (*ListOfStructs) BoolFieldByID ¶
func (los *ListOfStructs) BoolFieldByID(fieldID int, row int) (bool, error)
BoolFieldByID returns the bool value of a field id for a specific row.
func (*ListOfStructs) BoolFieldByName ¶
func (los *ListOfStructs) BoolFieldByName(name string, row int) (bool, error)
BoolFieldByName returns the bool value of a named field for a specific row.
func (*ListOfStructs) DataType ¶
func (los *ListOfStructs) DataType() *arrow.StructType
DataType returns the underlying arrow struct type.
func (*ListOfStructs) DurationFieldByID ¶
DurationFieldByID returns the duration value of a field id for a specific row or a 0 if the field doesn't exist.
func (*ListOfStructs) End ¶
func (los *ListOfStructs) End() int
End returns the end index of the list of structs.
func (*ListOfStructs) F64FieldByID ¶
func (los *ListOfStructs) F64FieldByID(fieldID int, row int) (float64, error)
F64FieldByID returns the float64 value of a field id for a specific row.
func (*ListOfStructs) F64FieldByName ¶
func (los *ListOfStructs) F64FieldByName(name string, row int) (float64, error)
F64FieldByName returns the float64 value of a named field for a specific row.
func (*ListOfStructs) F64OrNilFieldByID ¶
func (los *ListOfStructs) F64OrNilFieldByID(fieldID int, row int) (*float64, error)
F64OrNilFieldByID returns the float64 value of a field id for a specific row or nil if the field is null.
func (*ListOfStructs) Field ¶
func (los *ListOfStructs) Field(name string) (arrow.Array, bool)
Field returns the field array of a named field. The boolean return value indicates whether the field was found.
func (*ListOfStructs) FieldByID ¶
func (los *ListOfStructs) FieldByID(id int) arrow.Array
FieldByID returns the field array of a field id.
func (*ListOfStructs) FieldIdx ¶
func (los *ListOfStructs) FieldIdx(name string) (int, bool)
FieldIdx returns the field id of a named field. The boolean return value indicates whether the field was found.
func (*ListOfStructs) FixedSizeBinaryFieldByID ¶
func (los *ListOfStructs) FixedSizeBinaryFieldByID(fieldID int, row int) ([]byte, error)
FixedSizeBinaryFieldByID returns the fixed size binary value of a field id for a specific row.
func (*ListOfStructs) FixedSizeBinaryFieldByName ¶
func (los *ListOfStructs) FixedSizeBinaryFieldByName(name string, row int) ([]byte, error)
FixedSizeBinaryFieldByName returns the fixed size binary value of a named field for a specific row.
func (*ListOfStructs) I32FieldByID ¶
func (los *ListOfStructs) I32FieldByID(fieldID int, row int) (int32, error)
I32FieldByID returns the int32 value of a field id for a specific row.
func (*ListOfStructs) I32FieldByName ¶
func (los *ListOfStructs) I32FieldByName(name string, row int) (int32, error)
I32FieldByName returns the int32 value of a named field for a specific row.
func (*ListOfStructs) I64FieldByID ¶
func (los *ListOfStructs) I64FieldByID(fieldID int, row int) (int64, error)
I64FieldByID returns the int64 value of a field id for a specific row.
func (*ListOfStructs) I64FieldByName ¶
func (los *ListOfStructs) I64FieldByName(name string, row int) (int64, error)
I64FieldByName returns the int64 value of a named field for a specific row.
func (*ListOfStructs) IsNull ¶
func (los *ListOfStructs) IsNull(row int) bool
IsNull returns true if the row is null.
func (*ListOfStructs) ListOfStructsById ¶
func (los *ListOfStructs) ListOfStructsById(row int, fieldID int) (*ListOfStructs, error)
ListOfStructsById returns the list of structs for a field id for a specific row.
func (*ListOfStructs) ListValuesById ¶
func (los *ListOfStructs) ListValuesById(row int, fieldID int) (arr arrow.Array, start int, end int, err error)
ListValuesById return the list array for a field id for a specific row.
func (*ListOfStructs) NullableU16FieldByID ¶
func (los *ListOfStructs) NullableU16FieldByID(fieldID int, row int) (*uint16, error)
NullableU16FieldByID returns the uint16 value of a field id for a specific row or nil if the field doesn't exist.
func (*ListOfStructs) OptionalTimestampFieldByID ¶
func (los *ListOfStructs) OptionalTimestampFieldByID(fieldID int, row int) *pcommon.Timestamp
OptionalTimestampFieldByID returns the timestamp value of a field id for a specific row or nil if the field is null.
func (*ListOfStructs) Start ¶
func (los *ListOfStructs) Start() int
Start returns the start index of the list of structs.
func (*ListOfStructs) StringFieldByID ¶
func (los *ListOfStructs) StringFieldByID(fieldID int, row int) (string, error)
StringFieldByID returns the string value of a field id for a specific row or empty string if the field doesn't exist.
func (*ListOfStructs) StringFieldByName ¶
func (los *ListOfStructs) StringFieldByName(name string, row int) (string, error)
StringFieldByName returns the string value of a named field for a specific row.
func (*ListOfStructs) StructArray ¶
func (los *ListOfStructs) StructArray(name string, row int) (*arrow.StructType, *array.Struct, error)
StructArray returns the underlying arrow array for a named field for a specific row.
func (*ListOfStructs) StructByID ¶
func (los *ListOfStructs) StructByID(fieldID int, row int) (*arrow.StructType, *array.Struct, error)
StructByID returns the underlying arrow struct stype and arrow array for a field id for a specific row.
func (*ListOfStructs) TimestampFieldByID ¶
TimestampFieldByID returns the timestamp value of a field id for a specific row or a zero timestamp if the field doesn't exist.
func (*ListOfStructs) U16FieldByID ¶
func (los *ListOfStructs) U16FieldByID(fieldID int, row int) (uint16, error)
U16FieldByID returns the uint16 value of a field id for a specific row or 0 if the field doesn't exist.
func (*ListOfStructs) U32FieldByID ¶
func (los *ListOfStructs) U32FieldByID(fieldID int, row int) (uint32, error)
U32FieldByID returns the uint32 value of a field id for a specific row or 0 if the field doesn't exist.
func (*ListOfStructs) U32FieldByName ¶
func (los *ListOfStructs) U32FieldByName(name string, row int) (uint32, error)
U32FieldByName returns the uint32 value of a named field for a specific row.
func (*ListOfStructs) U64FieldByID ¶
func (los *ListOfStructs) U64FieldByID(fieldID int, row int) (uint64, error)
U64FieldByID returns the uint64 value of a field id for a specific row or 0 if the field doesn't exist.
func (*ListOfStructs) U64FieldByName ¶
func (los *ListOfStructs) U64FieldByName(name string, row int) (uint64, error)
U64FieldByName returns the uint64 value of a named field for a specific row.
type SortableField ¶
type SortableField struct {
// contains filtered or unexported fields
}
SortableField is a wrapper around arrow.Field that implements sort.Interface.
type TextColumn ¶ added in v0.5.0
TextColumn memorizes the contents of a column for printing. MaxLen is used to determine the column width.