badgers

package module
v0.0.0-...-645c863 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

README

badgers

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsFloat

func IsFloat(dt DataType) bool

func IsInteger

func IsInteger(dt DataType) bool

func IsKnown

func IsKnown(dt DataType) bool

func IsLogical

func IsLogical(dt DataType) bool

func IsNumeric

func IsNumeric(dt DataType) bool

func IsSignedInteger

func IsSignedInteger(dt DataType) bool

func IsTemporal

func IsTemporal(dt DataType) bool

func IsUnsignedInteger

func IsUnsignedInteger(dt DataType) bool

Types

type Allocator

type Allocator = memory.Allocator

type Array

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

func (Array) ArrayType

func (a Array) ArrayType() arrow.DataType

func (Array) Clone

func (a Array) Clone() DataType

func (Array) Elem

func (a Array) Elem() DataType

func (Array) Size

func (a Array) Size() int

func (Array) ValueWithinRange

func (a Array) ValueWithinRange(any) bool

type BadgersDataType

type BadgersDataType interface {
	bool | PrimitiveType | string | []byte
}

type Binary

type Binary struct{}

func (Binary) ArrayType

func (Binary) ArrayType() arrow.DataType

func (Binary) Clone

func (Binary) Clone() DataType

func (Binary) String

func (Binary) String() string

func (Binary) ValueWithinRange

func (Binary) ValueWithinRange(v any) bool

type Boolean

type Boolean struct{}

func (Boolean) ArrayType

func (Boolean) ArrayType() arrow.DataType

func (Boolean) Clone

func (Boolean) Clone() DataType

func (Boolean) String

func (Boolean) String() string

func (Boolean) ValueWithinRange

func (Boolean) ValueWithinRange(any) bool

type Categorical

type Categorical struct {
	Mapping  RevMapping
	Ordering CategoricalOrdering
}

func (Categorical) ArrayType

func (Categorical) ArrayType() arrow.DataType

func (Categorical) Clone

func (d Categorical) Clone() DataType

func (Categorical) ValueWithinRange

func (Categorical) ValueWithinRange(any) bool

type CategoricalOrdering

type CategoricalOrdering int8
const (
	Physical CategoricalOrdering = iota
	Lexical
)

type DataType

type DataType interface {
	ValueWithinRange(any) bool
	Clone() DataType
	ArrayType() arrow.DataType
}

func FromArrowType

func FromArrowType(dt arrow.DataType) DataType

func InnerDtype

func InnerDtype(dt DataType) DataType

func ToDataType

func ToDataType[T BadgersDataType]() DataType

func ToPhysical

func ToPhysical(dt DataType) DataType

type Date

type Date struct{}

func (Date) ArrayType

func (Date) ArrayType() arrow.DataType

func (Date) Clone

func (Date) Clone() DataType

func (Date) String

func (Date) String() string

func (Date) ValueWithinRange

func (Date) ValueWithinRange(v any) bool

type DateTime

type DateTime struct {
	Unit TimeUnit
	Zone string
}

func (DateTime) ArrayType

func (d DateTime) ArrayType() arrow.DataType

func (DateTime) Clone

func (d DateTime) Clone() DataType

func (DateTime) String

func (d DateTime) String() string

func (DateTime) ValueWithinRange

func (DateTime) ValueWithinRange(v any) bool

type Decimal

type Decimal struct {
	Precision, Scale uint32
}

func (Decimal) ArrayType

func (d Decimal) ArrayType() arrow.DataType

func (Decimal) Clone

func (d Decimal) Clone() DataType

func (Decimal) ValueWithinRange

func (Decimal) ValueWithinRange(v any) bool

type Duration

type Duration struct {
	Unit TimeUnit
}

func (Duration) ArrayType

func (d Duration) ArrayType() arrow.DataType

func (Duration) Clone

func (d Duration) Clone() DataType

func (Duration) String

func (d Duration) String() string

func (Duration) ValueWithinRange

func (Duration) ValueWithinRange(v any) bool

type Enum

type Enum struct {
	Mapping  RevMapping
	Ordering CategoricalOrdering
}

func (Enum) ArrayType

func (Enum) ArrayType() arrow.DataType

func (Enum) Clone

func (d Enum) Clone() DataType

func (Enum) ValueWithinRange

func (Enum) ValueWithinRange(any) bool

type Field

type Field struct {
	Name string
	Type DataType
}

type Float32

type Float32 = primitiveType[float32]

type Float64

type Float64 = primitiveType[float64]

type FloatType

type FloatType interface {
	float32 | float64
}

type Int16

type Int16 = primitiveType[int16]

type Int32

type Int32 = primitiveType[int32]

type Int64

type Int64 = primitiveType[int64]

type Int8

type Int8 = primitiveType[int8]

type IntegerType

type IntegerType interface {
	SignedIntegerType | UnsignedIntegerType
}

type List

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

func (List) ArrayType

func (l List) ArrayType() arrow.DataType

func (List) Child

func (l List) Child() DataType

func (List) Clone

func (l List) Clone() DataType

func (List) ValueWithinRange

func (l List) ValueWithinRange(any) bool

type Null

type Null struct{}

func (Null) ArrayType

func (Null) ArrayType() arrow.DataType

func (Null) Clone

func (Null) Clone() DataType

func (Null) String

func (Null) String() string

func (Null) ValueWithinRange

func (Null) ValueWithinRange(v any) bool

type NumericType

type NumericType interface {
	IntegerType | FloatType
}

type PrimitiveType

type PrimitiveType interface {
	NumericType | TemporalType
}

type RevMapping

type RevMapping interface {
	IsGlobal() bool
	IsLocal() bool
	GetCategories() []string
	BuildLocal(categories []string) RevMapping
	Len() uint
	Get(idx uint32) (string, bool)
	SameSrc(other RevMapping) bool
	Find(value string) (uint32, bool)
}

type SignedIntegerType

type SignedIntegerType interface {
	int8 | int16 | int32 | int64
}

type SimpleType

type SimpleType interface {
	bool | PrimitiveType | string
}

type String

type String struct{}

func (String) ArrayType

func (String) ArrayType() arrow.DataType

func (String) Clone

func (String) Clone() DataType

func (String) String

func (String) String() string

func (String) ValueWithinRange

func (String) ValueWithinRange(v any) bool

type Struct

type Struct []Field

func (Struct) ArrayType

func (s Struct) ArrayType() arrow.DataType

func (Struct) Clone

func (s Struct) Clone() DataType

func (Struct) NumFields

func (s Struct) NumFields() int

func (Struct) ValueWithinRange

func (s Struct) ValueWithinRange(any) bool

type TemporalType

type TemporalType interface {
	arrow.Time64 | arrow.Date32 | arrow.Timestamp
}

type Time

type Time struct{}

func (Time) ArrayType

func (Time) ArrayType() arrow.DataType

func (Time) Clone

func (Time) Clone() DataType

func (Time) String

func (Time) String() string

func (Time) ValueWithinRange

func (Time) ValueWithinRange(v any) bool

type TimeUnit

type TimeUnit int8
const (
	Nanoseconds TimeUnit = iota
	Microseconds
	Milliseconds
)

func (TimeUnit) String

func (i TimeUnit) String() string

func (TimeUnit) ToArrow

func (t TimeUnit) ToArrow() arrow.TimeUnit

type Uint16

type Uint16 = primitiveType[uint16]

type Uint32

type Uint32 = primitiveType[uint32]

type Uint64

type Uint64 = primitiveType[uint64]

type Uint8

type Uint8 = primitiveType[uint8]

type Unknown

type Unknown struct{}

func (Unknown) ArrayType

func (Unknown) ArrayType() arrow.DataType

func (Unknown) Clone

func (Unknown) Clone() DataType

func (Unknown) String

func (Unknown) String() string

func (Unknown) ValueWithinRange

func (Unknown) ValueWithinRange(any) bool

type UnsignedIntegerType

type UnsignedIntegerType interface {
	uint8 | uint16 | uint32 | uint64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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