Documentation ¶
Index ¶
- Constants
- Variables
- func BuildValueFilter(ctx context.Context, f []ValueFilter, source func(v1.Column) arrow.Array) (arrow.Array, error)
- func NewTimeBucket(args ...sql.Expression) (sql.Expression, error)
- type DB
- func (db *DB) AllViews(ctx *sql.Context) ([]sql.ViewDefinition, error)
- func (db *DB) CreateView(ctx *sql.Context, name string, selectStatement, createViewStmt string) error
- func (db *DB) DropView(ctx *sql.Context, name string) error
- func (db *DB) GetTableInsensitive(ctx *sql.Context, tblName string) (table sql.Table, ok bool, err error)
- func (DB) GetTableNames(ctx *sql.Context) (names []string, err error)
- func (db *DB) GetViewDefinition(ctx *sql.Context, viewName string) (sql.ViewDefinition, bool, error)
- func (DB) IsReadOnly() bool
- func (DB) Name() string
- type Domains
- type Engine
- type FilterContext
- type FilterIndex
- type FilterIndexFunc
- type FilterValue
- type Filters
- type Index
- func (idx *Index) CanSupport(...sql.Range) bool
- func (idx *Index) ColumnExpressionTypes() []sql.ColumnExpressionType
- func (idx *Index) ColumnExpressions() []sql.Expression
- func (idx *Index) Comment() string
- func (idx *Index) Database() string
- func (idx *Index) Expressions() []string
- func (idx *Index) ExtendedColumnExpressionTypes() []sql.ColumnExpressionType
- func (idx *Index) ExtendedExpressions() []string
- func (idx *Index) ID() string
- func (idx *Index) IndexType() string
- func (idx *Index) IsFullText() bool
- func (idx *Index) IsGenerated() bool
- func (idx *Index) IsSpatial() bool
- func (idx *Index) IsUnique() bool
- func (idx *Index) PrefixLengths() []uint16
- func (idx *Index) Table() string
- type IndexFilter
- type IndexFilterResult
- type IndexMatchFuncs
- type IndexedTable
- func (t IndexedTable) Collation() sql.CollationID
- func (t IndexedTable) GetIndexes(ctx *sql.Context) ([]sql.Index, error)
- func (t IndexedTable) IndexedAccess(i sql.IndexLookup) sql.IndexedTable
- func (t *IndexedTable) LookupPartitions(ctx *sql.Context, lookup sql.IndexLookup) (sql.PartitionIter, error)
- func (IndexedTable) Name() string
- func (t *IndexedTable) PartitionRows(ctx *sql.Context, partition sql.Partition) (sql.RowIter, error)
- func (t IndexedTable) Partitions(ctx *sql.Context) (sql.PartitionIter, error)
- func (t IndexedTable) Projections() (o []string)
- func (t IndexedTable) Schema() sql.Schema
- func (IndexedTable) String() string
- func (t IndexedTable) WithProjections(colNames []string) sql.Table
- type Op
- type Provider
- func (p *Provider) AllDatabases(_ *sql.Context) []sql.Database
- func (p *Provider) Database(_ *sql.Context, name string) (sql.Database, error)
- func (p *Provider) ExternalStoredProcedure(_ *sql.Context, name string, numOfParams int) (*sql.ExternalStoredProcedureDetails, error)
- func (p *Provider) ExternalStoredProcedures(_ *sql.Context, name string) ([]sql.ExternalStoredProcedureDetails, error)
- func (p *Provider) Function(ctx *sql.Context, name string) (sql.Function, error)
- func (p *Provider) HasDatabase(_ *sql.Context, name string) bool
- func (p *Provider) TableFunction(_ *sql.Context, name string) (sql.TableFunction, error)
- type RowGroups
- type Server
- type TimeBucket
- func (t *TimeBucket) Children() []sql.Expression
- func (t *TimeBucket) Description() string
- func (t *TimeBucket) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)
- func (t *TimeBucket) FunctionName() string
- func (t *TimeBucket) IsNullable() bool
- func (t *TimeBucket) Resolved() bool
- func (t *TimeBucket) String() string
- func (t *TimeBucket) Type() sql.Type
- func (t *TimeBucket) WithChildren(children ...sql.Expression) (sql.Expression, error)
- type ValueFilter
- type ValueMatchFuncs
Constants ¶
const TimeBucketName = "time_bucket"
Variables ¶
var Columns, Indexed = func() (o []string, idx map[string]storev1.Column) {
idx = make(map[string]storev1.Column)
for i := storev1.Column_bounce; i <= storev1.Column_utm_term; i++ {
if i >= storev1.Column_timestamp {
idx[i.String()] = i
}
o = append(o, i.String())
}
return
}()
var ErrNoFilter = errors.New("no filters")
var ErrSkipBlock = errors.New("skip block")
var VinceFuncs = []sql.Function{ sql.FunctionN{Name: TimeBucketName, Fn: NewTimeBucket}, }
Functions ¶
func BuildValueFilter ¶ added in v0.0.41
func NewTimeBucket ¶ added in v0.0.40
func NewTimeBucket(args ...sql.Expression) (sql.Expression, error)
Types ¶
type DB ¶ added in v0.0.28
type DB struct {
// contains filtered or unexported fields
}
func (*DB) CreateView ¶ added in v0.0.42
func (*DB) GetTableInsensitive ¶ added in v0.0.28
func (DB) GetTableNames ¶ added in v0.0.28
func (*DB) GetViewDefinition ¶ added in v0.0.42
func (DB) IsReadOnly ¶ added in v0.0.28
type FilterContext ¶ added in v0.0.45
type FilterContext struct { Domains Domains Index []IndexFilter Values []ValueFilter }
type FilterIndex ¶ added in v0.0.41
type FilterIndexFunc ¶ added in v0.0.44
type FilterValue ¶ added in v0.0.41
type Filters ¶ added in v0.0.42
type Filters struct { Index []IndexFilter Value []ValueFilter }
type Index ¶ added in v0.0.38
type Index struct { TableName string Exprs []sql.Expression PrefixLens []uint16 // contains filtered or unexported fields }
func (*Index) ColumnExpressionTypes ¶ added in v0.0.38
func (idx *Index) ColumnExpressionTypes() []sql.ColumnExpressionType
func (*Index) ColumnExpressions ¶ added in v0.0.38
func (idx *Index) ColumnExpressions() []sql.Expression
func (*Index) Expressions ¶ added in v0.0.38
func (*Index) ExtendedColumnExpressionTypes ¶ added in v0.0.38
func (idx *Index) ExtendedColumnExpressionTypes() []sql.ColumnExpressionType
func (*Index) ExtendedExpressions ¶ added in v0.0.38
func (*Index) IsFullText ¶ added in v0.0.38
func (*Index) IsGenerated ¶ added in v0.0.38
func (*Index) PrefixLengths ¶ added in v0.0.38
type IndexFilter ¶ added in v0.0.41
type IndexFilter interface { Column() v1.Column FilterIndex(ctx context.Context, idx *blocksv1.ColumnIndex) (*RowGroups, error) }
IndexFilter is an interface for choosing row groups and row group pages to read based on a column index.
This filter is first applied before values are read into arrow.Record. Only row groups and row group pages that matches across all IndexFilter are selected for reads
type IndexFilterResult ¶ added in v0.0.42
type IndexMatchFuncs ¶ added in v0.0.41
type IndexMatchFuncs struct { Col v1.Column Value any FilterIndexFunc FilterIndexFunc }
func (*IndexMatchFuncs) Column ¶ added in v0.0.41
func (i *IndexMatchFuncs) Column() v1.Column
func (*IndexMatchFuncs) FilterIndex ¶ added in v0.0.41
func (i *IndexMatchFuncs) FilterIndex(ctx context.Context, idx *blocksv1.ColumnIndex) (*RowGroups, error)
type IndexedTable ¶ added in v0.0.38
type IndexedTable struct { Lookup sql.IndexLookup // contains filtered or unexported fields }
func (IndexedTable) Collation ¶ added in v0.0.46
func (t IndexedTable) Collation() sql.CollationID
func (IndexedTable) GetIndexes ¶ added in v0.0.46
func (IndexedTable) IndexedAccess ¶ added in v0.0.46
func (t IndexedTable) IndexedAccess(i sql.IndexLookup) sql.IndexedTable
func (*IndexedTable) LookupPartitions ¶ added in v0.0.38
func (t *IndexedTable) LookupPartitions(ctx *sql.Context, lookup sql.IndexLookup) (sql.PartitionIter, error)
func (*IndexedTable) PartitionRows ¶ added in v0.0.38
func (t *IndexedTable) PartitionRows(ctx *sql.Context, partition sql.Partition) (sql.RowIter, error)
PartitionRows implements the sql.PartitionRows interface.
func (IndexedTable) Partitions ¶ added in v0.0.46
func (t IndexedTable) Partitions(ctx *sql.Context) (sql.PartitionIter, error)
func (IndexedTable) Projections ¶ added in v0.0.46
func (t IndexedTable) Projections() (o []string)
func (IndexedTable) WithProjections ¶ added in v0.0.46
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func NewProvider ¶ added in v0.0.45
func NewProvider() *Provider
func (*Provider) ExternalStoredProcedure ¶ added in v0.0.45
func (p *Provider) ExternalStoredProcedure(_ *sql.Context, name string, numOfParams int) (*sql.ExternalStoredProcedureDetails, error)
ExternalStoredProcedure implements the sql.ExternalStoredProcedureProvider interface
func (*Provider) ExternalStoredProcedures ¶ added in v0.0.45
func (p *Provider) ExternalStoredProcedures(_ *sql.Context, name string) ([]sql.ExternalStoredProcedureDetails, error)
ExternalStoredProcedures implements the sql.ExternalStoredProcedureProvider interface
func (*Provider) TableFunction ¶ added in v0.0.46
type RowGroups ¶ added in v0.0.42
type RowGroups struct {
// contains filtered or unexported fields
}
func NewRowGroups ¶ added in v0.0.44
func NewRowGroups() *RowGroups
func (*RowGroups) SelectGroup ¶ added in v0.0.42
type TimeBucket ¶ added in v0.0.40
type TimeBucket struct {
// contains filtered or unexported fields
}
func (*TimeBucket) Children ¶ added in v0.0.40
func (t *TimeBucket) Children() []sql.Expression
Children implements the sql.Expression interface.
func (*TimeBucket) Description ¶ added in v0.0.40
func (t *TimeBucket) Description() string
Description implements sql.FunctionExpression
func (*TimeBucket) FunctionName ¶ added in v0.0.40
func (t *TimeBucket) FunctionName() string
FunctionName implements sql.FunctionExpression
func (*TimeBucket) IsNullable ¶ added in v0.0.40
func (t *TimeBucket) IsNullable() bool
IsNullable implements the sql.Expression interface.
func (*TimeBucket) Resolved ¶ added in v0.0.40
func (t *TimeBucket) Resolved() bool
Resolved implements the sql.Expression interface.
func (*TimeBucket) String ¶ added in v0.0.40
func (t *TimeBucket) String() string
func (*TimeBucket) Type ¶ added in v0.0.40
func (t *TimeBucket) Type() sql.Type
Type implements the sql.Expression interface.
func (*TimeBucket) WithChildren ¶ added in v0.0.40
func (t *TimeBucket) WithChildren(children ...sql.Expression) (sql.Expression, error)
WithChildren implements the Expression interface.
type ValueFilter ¶ added in v0.0.41
type ValueMatchFuncs ¶ added in v0.0.41
type ValueMatchFuncs struct { Col v1.Column Value any FilterValueFunc func(ctx context.Context, value arrow.Array) (arrow.Array, error) }
func (*ValueMatchFuncs) Column ¶ added in v0.0.41
func (i *ValueMatchFuncs) Column() v1.Column