Documentation ¶
Index ¶
- Constants
- type AllocatorOption
- type Builder
- type FakeTableProvider
- type FakeTableReader
- func (r *FakeTableReader) Iterator(ctx context.Context, _ uint64, _ memory.Allocator, ...) error
- func (r *FakeTableReader) Schema() *dynparquet.Schema
- func (r *FakeTableReader) SchemaIterator(_ context.Context, _ uint64, _ memory.Allocator, _ []logicalplan.Callback, ...) error
- func (r *FakeTableReader) View(ctx context.Context, fn func(ctx context.Context, tx uint64) error) error
- type LimitAllocator
- type LocalEngine
- type LocalQueryBuilder
- func (b LocalQueryBuilder) Aggregate(aggExpr []*logicalplan.AggregationFunction, groupExprs []logicalplan.Expr) Builder
- func (b LocalQueryBuilder) Distinct(expr ...logicalplan.Expr) Builder
- func (b LocalQueryBuilder) Execute(ctx context.Context, callback func(ctx context.Context, r arrow.Record) error) error
- func (b LocalQueryBuilder) Explain(ctx context.Context) (string, error)
- func (b LocalQueryBuilder) Filter(expr logicalplan.Expr) Builder
- func (b LocalQueryBuilder) Limit(expr logicalplan.Expr) Builder
- func (b LocalQueryBuilder) Project(projections ...logicalplan.Expr) Builder
- type Option
Constants ¶
View Source
const PanicMemoryLimit = "memory limit exceeded"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllocatorOption ¶
type AllocatorOption func(*LimitAllocator)
func WithRegistry ¶
func WithRegistry(reg prometheus.Registerer) AllocatorOption
type Builder ¶
type Builder interface { Aggregate(aggExpr []*logicalplan.AggregationFunction, groupExprs []logicalplan.Expr) Builder Filter(expr logicalplan.Expr) Builder Distinct(expr ...logicalplan.Expr) Builder Project(projections ...logicalplan.Expr) Builder Limit(expr logicalplan.Expr) Builder Execute(ctx context.Context, callback func(ctx context.Context, r arrow.Record) error) error Explain(ctx context.Context) (string, error) }
type FakeTableProvider ¶
type FakeTableProvider struct {
Tables map[string]logicalplan.TableReader
}
func (*FakeTableProvider) GetTable ¶
func (f *FakeTableProvider) GetTable(name string) (logicalplan.TableReader, error)
type FakeTableReader ¶
type FakeTableReader struct { Records []arrow.Record FrostdbSchema *dynparquet.Schema }
func (*FakeTableReader) Iterator ¶
func (r *FakeTableReader) Iterator( ctx context.Context, _ uint64, _ memory.Allocator, callbacks []logicalplan.Callback, _ ...logicalplan.Option, ) error
func (*FakeTableReader) Schema ¶
func (r *FakeTableReader) Schema() *dynparquet.Schema
func (*FakeTableReader) SchemaIterator ¶
func (r *FakeTableReader) SchemaIterator( _ context.Context, _ uint64, _ memory.Allocator, _ []logicalplan.Callback, _ ...logicalplan.Option, ) error
type LimitAllocator ¶
type LimitAllocator struct {
// contains filtered or unexported fields
}
LimitAllocator is a wrapper around a memory.Allocator that panics if the memory usage exceeds the defined limit.
func NewLimitAllocator ¶
func NewLimitAllocator(limit int64, allocator memory.Allocator, options ...AllocatorOption) *LimitAllocator
func (*LimitAllocator) Allocate ¶
func (a *LimitAllocator) Allocate(size int) []byte
func (*LimitAllocator) Allocated ¶
func (a *LimitAllocator) Allocated() int
func (*LimitAllocator) Free ¶
func (a *LimitAllocator) Free(b []byte)
func (*LimitAllocator) Reallocate ¶
func (a *LimitAllocator) Reallocate(size int, b []byte) []byte
type LocalEngine ¶
type LocalEngine struct {
// contains filtered or unexported fields
}
func NewEngine ¶
func NewEngine( pool memory.Allocator, tableProvider logicalplan.TableProvider, options ...Option, ) *LocalEngine
func (*LocalEngine) ScanSchema ¶
func (e *LocalEngine) ScanSchema(name string) Builder
func (*LocalEngine) ScanTable ¶
func (e *LocalEngine) ScanTable(name string) Builder
type LocalQueryBuilder ¶
type LocalQueryBuilder struct {
// contains filtered or unexported fields
}
func (LocalQueryBuilder) Aggregate ¶
func (b LocalQueryBuilder) Aggregate( aggExpr []*logicalplan.AggregationFunction, groupExprs []logicalplan.Expr, ) Builder
func (LocalQueryBuilder) Distinct ¶
func (b LocalQueryBuilder) Distinct( expr ...logicalplan.Expr, ) Builder
func (LocalQueryBuilder) Explain ¶
func (b LocalQueryBuilder) Explain(ctx context.Context) (string, error)
func (LocalQueryBuilder) Filter ¶
func (b LocalQueryBuilder) Filter( expr logicalplan.Expr, ) Builder
func (LocalQueryBuilder) Limit ¶
func (b LocalQueryBuilder) Limit( expr logicalplan.Expr, ) Builder
func (LocalQueryBuilder) Project ¶
func (b LocalQueryBuilder) Project( projections ...logicalplan.Expr, ) Builder
type Option ¶
type Option func(*LocalEngine)
func WithPhysicalplanOptions ¶
func WithPhysicalplanOptions(opts ...physicalplan.Option) Option
func WithTracer ¶
Click to show internal directories.
Click to hide internal directories.