Documentation
¶
Index ¶
- func Filter(rec arrow.Record, filter arrow.Array) (arrow.Record, error)
- func Select(rec arrow.Record, cols ...string) arrow.Record
- type Aggregation
- type AlignedAllocator
- type DataType
- type Hook
- type Pipeline
- type Predicate
- type Reader
- type Record
- type Stage
- type Stream
- type StreamingPipeline
- func (sp *StreamingPipeline) Aggregate(agg Aggregation, column string) *StreamingPipeline
- func (sp *StreamingPipeline) Execute(ctx context.Context) <-chan arrow.Record
- func (sp *StreamingPipeline) Filter(expression string) *StreamingPipeline
- func (sp *StreamingPipeline) Project(columns []string) *StreamingPipeline
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Aggregation ¶
type Aggregation string
Aggregation is an enumeration of aggregation functions.
const ( // Sum is the sum aggregation. Sum Aggregation = "SUM" // Mean is the mean aggregation. Mean Aggregation = "MEAN" // Count is the count aggregation. Count Aggregation = "COUNT" )
type AlignedAllocator ¶
type AlignedAllocator struct {
// contains filtered or unexported fields
}
AlignedAllocator is a memory allocator that ensures memory is aligned to a specific boundary. This is crucial for performance with certain hardware instructions (e.g., SIMD).
func NewAlignedAllocator ¶
func NewAlignedAllocator(pool memory.Allocator, alignment int) *AlignedAllocator
NewAlignedAllocator creates a new AlignedAllocator.
func (*AlignedAllocator) Allocate ¶
func (a *AlignedAllocator) Allocate(size int) []byte
Allocate allocates a slice of memory with the specified alignment.
func (*AlignedAllocator) Free ¶
func (a *AlignedAllocator) Free(b []byte)
Free frees a slice of memory.
func (*AlignedAllocator) Reallocate ¶
func (a *AlignedAllocator) Reallocate(size int, b []byte) []byte
Reallocate reallocates a slice of memory.
type Hook ¶
type Hook interface {
// Execute is called at a specific point in the engine's execution.
Execute(context.Context, interface{}) error
}
Hook is an interface for extending the engine's functionality.
type Pipeline ¶
type Pipeline struct {
// contains filtered or unexported fields
}
Pipeline represents a series of processing stages.
type Predicate ¶
type Predicate interface {
// Eval evaluates the predicate on the given record and returns a boolean array
// indicating which rows match the condition.
Eval(rec arrow.Record) (arrow.Array, error)
}
Predicate is an interface for evaluating a filter condition on a record.
func NewPredicate ¶
NewPredicate creates a new predicate from a filter expression string. It supports simple binary expressions and AND (&&) / OR (||) operators.
type Record ¶
Record represents a chunk of columnar data. A stream of Records forms a chunked, streaming data layout.
type StreamingPipeline ¶
type StreamingPipeline struct {
// contains filtered or unexported fields
}
StreamingPipeline represents a streaming pipeline.
func NewStreamingPipeline ¶
func NewStreamingPipeline(in <-chan arrow.Record) *StreamingPipeline
NewStreamingPipeline creates a new streaming pipeline.
func (*StreamingPipeline) Aggregate ¶
func (sp *StreamingPipeline) Aggregate(agg Aggregation, column string) *StreamingPipeline
Aggregate adds an aggregation stage to the pipeline.
func (*StreamingPipeline) Execute ¶
func (sp *StreamingPipeline) Execute(ctx context.Context) <-chan arrow.Record
Execute runs the streaming pipeline.
func (*StreamingPipeline) Filter ¶
func (sp *StreamingPipeline) Filter(expression string) *StreamingPipeline
Filter adds a filter stage to the pipeline.
func (*StreamingPipeline) Project ¶
func (sp *StreamingPipeline) Project(columns []string) *StreamingPipeline
Project adds a projection stage to the pipeline.