expr

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupportedBinaryOperation = errors.New("unsupported binary operation")

Functions

func BinaryScalarOperation

func BinaryScalarOperation(left parquet.ColumnChunk, right parquet.Value, operator logicalplan.Op) (bool, error)

BinaryScalarOperation applies the given operator between the given column chunk and value. If BinaryScalarOperation returns true, it means that the operator may be satisfied by at least one value in the column chunk. If it returns false, it means that the operator will definitely not be satisfied by any value in the column chunk.

func Max

func Max(columnIndex parquet.ColumnIndex) parquet.Value

Max returns the maximum value found in the column chunk across all pages.

func Min

func Min(columnIndex parquet.ColumnIndex) parquet.Value

Min returns the minimum value found in the column chunk across all pages.

func NullCount

func NullCount(columnIndex parquet.ColumnIndex) int64

Types

type AlwaysTrueFilter

type AlwaysTrueFilter struct{}

func (*AlwaysTrueFilter) Eval

func (f *AlwaysTrueFilter) Eval(_ Particulate) (bool, error)

type AndExpr

type AndExpr struct {
	Left  TrueNegativeFilter
	Right TrueNegativeFilter
}

func (*AndExpr) Eval

func (a *AndExpr) Eval(p Particulate) (bool, error)

type BinaryScalarExpr

type BinaryScalarExpr struct {
	Left  *ColumnRef
	Op    logicalplan.Op
	Right parquet.Value
}

func (BinaryScalarExpr) Eval

func (e BinaryScalarExpr) Eval(p Particulate) (bool, error)

type ColumnRef

type ColumnRef struct {
	ColumnName string
}

func (*ColumnRef) Column

func (c *ColumnRef) Column(p Particulate) (parquet.ColumnChunk, bool, error)

type MaxAgg

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

func (*MaxAgg) Eval

func (a *MaxAgg) Eval(p Particulate) (bool, error)

type OrExpr

type OrExpr struct {
	Left  TrueNegativeFilter
	Right TrueNegativeFilter
}

func (*OrExpr) Eval

func (a *OrExpr) Eval(p Particulate) (bool, error)

type Particulate

type Particulate interface {
	Schema() *parquet.Schema
	ColumnChunks() []parquet.ColumnChunk
}

Particulate is an abstraction of something that can be filtered. A parquet.RowGroup is a particulate that is able to be filtered, and wrapping a parquet.File with ParquetFileParticulate allows a file to be filtered.

type PreExprVisitorFunc

type PreExprVisitorFunc func(expr logicalplan.Expr) bool

func (PreExprVisitorFunc) PostVisit

func (f PreExprVisitorFunc) PostVisit(_ logicalplan.Expr) bool

func (PreExprVisitorFunc) PreVisit

func (f PreExprVisitorFunc) PreVisit(expr logicalplan.Expr) bool

func (PreExprVisitorFunc) Visit

type TrueNegativeFilter

type TrueNegativeFilter interface {
	// Eval should be safe to call concurrently.
	Eval(Particulate) (bool, error)
}

func BooleanExpr

func BooleanExpr(expr logicalplan.Expr) (TrueNegativeFilter, error)

Jump to

Keyboard shortcuts

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