Versions in this module Expand all Collapse all v0 v0.0.1 Mar 23, 2024 Changes in this version + func DataTypeForExprWithSchema(expr Expr, s *dynparquet.Schema) (arrow.DataType, error) + func Validate(plan *LogicalPlan) error + type AggFunc uint32 + const AggFuncAnd + const AggFuncAvg + const AggFuncCount + const AggFuncMax + const AggFuncMin + const AggFuncSum + const AggFuncUnique + const AggFuncUnknown + func (f AggFunc) String() string + type AggFuncPushDown struct + func (p *AggFuncPushDown) Optimize(plan *LogicalPlan) *LogicalPlan + type Aggregation struct + AggExprs []*AggregationFunction + GroupExprs []Expr + func (a *Aggregation) String() string + type AggregationFunction struct + Expr Expr + Func AggFunc + func AndAgg(expr Expr) *AggregationFunction + func Avg(expr Expr) *AggregationFunction + func Count(expr Expr) *AggregationFunction + func Max(expr Expr) *AggregationFunction + func Min(expr Expr) *AggregationFunction + func Sum(expr Expr) *AggregationFunction + func Unique(expr Expr) *AggregationFunction + func (f *AggregationFunction) Accept(visitor Visitor) bool + func (f *AggregationFunction) Alias(alias string) *AliasExpr + func (f *AggregationFunction) Clone() Expr + func (f *AggregationFunction) ColumnsUsedExprs() []Expr + func (f *AggregationFunction) Computed() bool + func (f *AggregationFunction) DataType(l ExprTypeFinder) (arrow.DataType, error) + func (f *AggregationFunction) Equal(other Expr) bool + func (f *AggregationFunction) MatchColumn(columnName string) bool + func (f *AggregationFunction) MatchPath(path string) bool + func (f *AggregationFunction) Name() string + func (f *AggregationFunction) String() string + type AliasExpr struct + Alias string + Expr Expr + func (e *AliasExpr) Accept(visitor Visitor) bool + func (e *AliasExpr) Clone() Expr + func (e *AliasExpr) ColumnsUsedExprs() []Expr + func (e *AliasExpr) Computed() bool + func (e *AliasExpr) DataType(l ExprTypeFinder) (arrow.DataType, error) + func (e *AliasExpr) Equal(other Expr) bool + func (e *AliasExpr) MatchColumn(columnName string) bool + func (e *AliasExpr) MatchPath(path string) bool + func (e *AliasExpr) Name() string + func (e *AliasExpr) String() string + type AllExpr struct + func All() *AllExpr + func (a *AllExpr) Accept(visitor Visitor) bool + func (a *AllExpr) Clone() Expr + func (a *AllExpr) ColumnsUsedExprs() []Expr + func (a *AllExpr) Computed() bool + func (a *AllExpr) DataType(ExprTypeFinder) (arrow.DataType, error) + func (a *AllExpr) Equal(other Expr) bool + func (a *AllExpr) MatchColumn(_ string) bool + func (a *AllExpr) MatchPath(_ string) bool + func (a *AllExpr) Name() string + func (a *AllExpr) String() string + type BinaryExpr struct + Left Expr + Op Op + Right Expr + func Add(left, right Expr) *BinaryExpr + func Div(left, right Expr) *BinaryExpr + func Mul(left, right Expr) *BinaryExpr + func Sub(left, right Expr) *BinaryExpr + func (e *BinaryExpr) Accept(visitor Visitor) bool + func (e *BinaryExpr) Alias(alias string) *AliasExpr + func (e *BinaryExpr) Clone() Expr + func (e *BinaryExpr) ColumnsUsedExprs() []Expr + func (e *BinaryExpr) Computed() bool + func (e *BinaryExpr) DataType(l ExprTypeFinder) (arrow.DataType, error) + func (e *BinaryExpr) Equal(other Expr) bool + func (e *BinaryExpr) MatchColumn(columnName string) bool + func (e *BinaryExpr) MatchPath(path string) bool + func (e *BinaryExpr) Name() string + func (e *BinaryExpr) String() string + type Builder struct + func (b Builder) Aggregate(aggExpr []*AggregationFunction, groupExprs []Expr) Builder + func (b Builder) Build() (*LogicalPlan, error) + func (b Builder) Distinct(exprs ...Expr) Builder + func (b Builder) Filter(expr Expr) Builder + func (b Builder) Limit(expr Expr) Builder + func (b Builder) Project(exprs ...Expr) Builder + func (b Builder) Scan(provider TableProvider, tableName string) Builder + func (b Builder) ScanSchema(provider TableProvider, tableName string) Builder + type Callback func(ctx context.Context, r arrow.Record) error + type Column struct + ColumnName string + func Col(name string) *Column + func (c *Column) Accept(visitor Visitor) bool + func (c *Column) Alias(alias string) *AliasExpr + func (c *Column) Clone() Expr + func (c *Column) ColumnsUsedExprs() []Expr + func (c *Column) Computed() bool + func (c *Column) Contains(pattern string) *BinaryExpr + func (c *Column) ContainsNot(pattern string) *BinaryExpr + func (c *Column) DataType(l ExprTypeFinder) (arrow.DataType, error) + func (c *Column) Eq(e Expr) *BinaryExpr + func (c *Column) Equal(other Expr) bool + func (c *Column) Gt(e Expr) *BinaryExpr + func (c *Column) GtEq(e Expr) *BinaryExpr + func (c *Column) Lt(e Expr) *BinaryExpr + func (c *Column) LtEq(e Expr) *BinaryExpr + func (c *Column) MatchColumn(columnName string) bool + func (c *Column) MatchPath(path string) bool + func (c *Column) Name() string + func (c *Column) NotEq(e Expr) *BinaryExpr + func (c *Column) RegexMatch(pattern string) *BinaryExpr + func (c *Column) RegexNotMatch(pattern string) *BinaryExpr + func (c *Column) String() string + type ConvertExpr struct + Expr Expr + Type arrow.DataType + func Convert(e Expr, t arrow.DataType) *ConvertExpr + func (e *ConvertExpr) Accept(visitor Visitor) bool + func (e *ConvertExpr) Alias(alias string) *AliasExpr + func (e *ConvertExpr) Clone() Expr + func (e *ConvertExpr) ColumnsUsedExprs() []Expr + func (e *ConvertExpr) Computed() bool + func (e *ConvertExpr) DataType(l ExprTypeFinder) (arrow.DataType, error) + func (e *ConvertExpr) Equal(other Expr) bool + func (e *ConvertExpr) MatchColumn(columnName string) bool + func (e *ConvertExpr) MatchPath(path string) bool + func (e *ConvertExpr) Name() string + func (e *ConvertExpr) String() string + type Distinct struct + Exprs []Expr + func (d *Distinct) String() string + type DistinctPushDown struct + func (p *DistinctPushDown) Optimize(plan *LogicalPlan) *LogicalPlan + type DurationExpr struct + func Duration(d time.Duration) *DurationExpr + func (d *DurationExpr) Accept(visitor Visitor) bool + func (d *DurationExpr) Clone() Expr + func (d *DurationExpr) ColumnsUsedExprs() []Expr + func (d *DurationExpr) Computed() bool + func (d *DurationExpr) DataType(_ ExprTypeFinder) (arrow.DataType, error) + func (d *DurationExpr) Equal(other Expr) bool + func (d *DurationExpr) MatchColumn(columnName string) bool + func (d *DurationExpr) MatchPath(_ string) bool + func (d *DurationExpr) Name() string + func (d *DurationExpr) String() string + func (d *DurationExpr) Value() time.Duration + type DynamicColumn struct + ColumnName string + func DynCol(name string) *DynamicColumn + func (c *DynamicColumn) Accept(visitor Visitor) bool + func (c *DynamicColumn) Clone() Expr + func (c *DynamicColumn) ColumnsUsedExprs() []Expr + func (c *DynamicColumn) Computed() bool + func (c *DynamicColumn) DataType(l ExprTypeFinder) (arrow.DataType, error) + func (c *DynamicColumn) Equal(other Expr) bool + func (c *DynamicColumn) MatchColumn(columnName string) bool + func (c *DynamicColumn) MatchPath(path string) bool + func (c *DynamicColumn) Name() string + func (c *DynamicColumn) String() string + type Expr interface + Accept func(Visitor) bool + Clone func() Expr + ColumnsUsedExprs func() []Expr + Computed func() bool + DataType func(ExprTypeFinder) (arrow.DataType, error) + Equal func(Expr) bool + MatchColumn func(columnName string) bool + MatchPath func(path string) bool + Name func() string + func And(exprs ...Expr) Expr + func Cols(names ...string) []Expr + func Or(exprs ...Expr) Expr + type ExprTypeFinder interface + DataTypeForExpr func(expr Expr) (arrow.DataType, error) + type ExprValidationError struct + func ValidateAggregationExpr(plan *LogicalPlan) *ExprValidationError + func ValidateComparingTypes(columnType *format.LogicalType, literal scalar.Scalar) *ExprValidationError + func ValidateFilterAndBinaryExpr(plan *LogicalPlan, expr *BinaryExpr) *ExprValidationError + func ValidateFilterBinaryExpr(plan *LogicalPlan, expr *BinaryExpr) *ExprValidationError + func ValidateFilterExpr(plan *LogicalPlan, e Expr) *ExprValidationError + func (e *ExprValidationError) Error() string + type Filter struct + Expr Expr + func (f *Filter) String() string + type FilterPushDown struct + func (p *FilterPushDown) Optimize(plan *LogicalPlan) *LogicalPlan + type IfExpr struct + Cond Expr + Else Expr + Then Expr + func If(cond, then, els Expr) *IfExpr + func (e *IfExpr) Accept(visitor Visitor) bool + func (e *IfExpr) Alias(name string) *AliasExpr + func (e *IfExpr) Clone() Expr + func (e *IfExpr) ColumnsUsedExprs() []Expr + func (e *IfExpr) Computed() bool + func (e *IfExpr) DataType(l ExprTypeFinder) (arrow.DataType, error) + func (e *IfExpr) Equal(other Expr) bool + func (e *IfExpr) MatchColumn(columnName string) bool + func (e *IfExpr) MatchPath(path string) bool + func (e *IfExpr) Name() string + func (e *IfExpr) String() string + type IsNullExpr struct + Expr Expr + func IsNull(expr Expr) *IsNullExpr + func (e *IsNullExpr) Accept(visitor Visitor) bool + func (e *IsNullExpr) Clone() Expr + func (e *IsNullExpr) ColumnsUsedExprs() []Expr + func (e *IsNullExpr) Computed() bool + func (e *IsNullExpr) DataType(l ExprTypeFinder) (arrow.DataType, error) + func (e *IsNullExpr) Equal(other Expr) bool + func (e *IsNullExpr) MatchColumn(columnName string) bool + func (e *IsNullExpr) MatchPath(path string) bool + func (e *IsNullExpr) Name() string + func (e *IsNullExpr) String() string + type IterOptions struct + DistinctColumns []Expr + Filter Expr + PhysicalProjection []Expr + Projection []Expr + ReadMode ReadMode + type Limit struct + Expr Expr + func (l *Limit) String() string + type LiteralExpr struct + Value scalar.Scalar + func Literal(v interface{}) *LiteralExpr + func (e *LiteralExpr) Accept(visitor Visitor) bool + func (e *LiteralExpr) Clone() Expr + func (e *LiteralExpr) ColumnsUsedExprs() []Expr + func (e *LiteralExpr) Computed() bool + func (e *LiteralExpr) DataType(_ ExprTypeFinder) (arrow.DataType, error) + func (e *LiteralExpr) Equal(other Expr) bool + func (e *LiteralExpr) MatchColumn(columnName string) bool + func (e *LiteralExpr) MatchPath(path string) bool + func (e *LiteralExpr) Name() string + func (e *LiteralExpr) String() string + type LogicalPlan struct + Aggregation *Aggregation + Distinct *Distinct + Filter *Filter + Input *LogicalPlan + Limit *Limit + Projection *Projection + SchemaScan *SchemaScan + TableScan *TableScan + func (plan *LogicalPlan) Accept(visitor PlanVisitor) bool + func (plan *LogicalPlan) DataTypeForExpr(expr Expr) (arrow.DataType, error) + func (plan *LogicalPlan) InputSchema() *dynparquet.Schema + func (plan *LogicalPlan) String() string + func (plan *LogicalPlan) TableReader() (TableReader, error) + type Named interface + Name func() string + type NotExpr struct + Expr Expr + func Not(expr Expr) *NotExpr + func (n *NotExpr) Accept(visitor Visitor) bool + func (n *NotExpr) Clone() Expr + func (n *NotExpr) ColumnsUsedExprs() []Expr + func (n *NotExpr) Computed() bool + func (n *NotExpr) DataType(l ExprTypeFinder) (arrow.DataType, error) + func (n *NotExpr) Equal(other Expr) bool + func (n *NotExpr) MatchColumn(columnName string) bool + func (n *NotExpr) MatchPath(path string) bool + func (n *NotExpr) Name() string + func (n *NotExpr) String() string + type Op uint32 + const OpAdd + const OpAnd + const OpContains + const OpDiv + const OpEq + const OpGt + const OpGtEq + const OpLt + const OpLtEq + const OpMul + const OpNotContains + const OpNotEq + const OpOr + const OpRegexMatch + const OpRegexNotMatch + const OpSub + const OpUnknown + func (o Op) ArrowString() string + func (o Op) String() string + type Optimizer interface + Optimize func(plan *LogicalPlan) *LogicalPlan + func DefaultOptimizers() []Optimizer + type Option func(opts *IterOptions) + func WithDistinctColumns(e ...Expr) Option + func WithFilter(e Expr) Option + func WithPhysicalProjection(e ...Expr) Option + func WithProjection(e ...Expr) Option + func WithReadMode(m ReadMode) Option + type PhysicalProjectionPushDown struct + func (p *PhysicalProjectionPushDown) Optimize(plan *LogicalPlan) *LogicalPlan + type PlanValidationError struct + func ValidateAggregation(plan *LogicalPlan) *PlanValidationError + func ValidateFilter(plan *LogicalPlan) *PlanValidationError + func ValidateInput(plan *LogicalPlan) *PlanValidationError + func ValidateSchemaScan(plan *LogicalPlan) *PlanValidationError + func ValidateSingleFieldSet(plan *LogicalPlan) *PlanValidationError + func ValidateTableScan(plan *LogicalPlan) *PlanValidationError + func (e *PlanValidationError) Error() string + type PlanVisitor interface + PostVisit func(plan *LogicalPlan) bool + PreVisit func(plan *LogicalPlan) bool + type Projection struct + Exprs []Expr + func (p *Projection) String() string + type ReadMode int + const ReadModeDataSourcesOnly + const ReadModeDefault + const ReadModeInMemoryOnly + type SchemaScan struct + Distinct []Expr + Filter Expr + PhysicalProjection []Expr + Projection []Expr + ReadMode ReadMode + TableName string + TableProvider TableProvider + func (s *SchemaScan) DataTypeForExpr(expr Expr) (arrow.DataType, error) + func (s *SchemaScan) String() string + type TableProvider interface + GetTable func(name string) (TableReader, error) + type TableReader interface + Iterator func(ctx context.Context, tx uint64, pool memory.Allocator, callbacks []Callback, ...) error + Schema func() *dynparquet.Schema + SchemaIterator func(ctx context.Context, tx uint64, pool memory.Allocator, callbacks []Callback, ...) error + View func(ctx context.Context, fn func(ctx context.Context, tx uint64) error) error + type TableScan struct + Distinct []Expr + Filter Expr + PhysicalProjection []Expr + Projection []Expr + ReadMode ReadMode + TableName string + TableProvider TableProvider + func (scan *TableScan) DataTypeForExpr(expr Expr) (arrow.DataType, error) + func (scan *TableScan) String() string + type Visitor interface + PostVisit func(expr Expr) bool + PreVisit func(expr Expr) bool + Visit func(expr Expr) bool