Versions in this module Expand all Collapse all v0 v0.8.0 Dec 30, 2020 Changes in this version + var DefaultRules = []Rule + var DefaultValidationRules = []Rule + var ErrAmbiguousColumnName = errors.NewKind("ambiguous column name %q, it's present in all these tables: %v") + var ErrCaseResultType = errors.NewKind(...) + var ErrColumnNotFound = errors.NewKind("column %q could not be found in any table in scope") + var ErrColumnTableNotFound = errors.NewKind("table %q does not have column %q") + var ErrExplodeInvalidUse = errors.NewKind("using EXPLODE is not supported outside a Project node") + var ErrFieldMissing = errors.NewKind("field %q is not on schema") + var ErrIntervalInvalidUse = errors.NewKind(...) + var ErrMaxAnalysisIters = errors.NewKind("exceeded max analysis iterations (%d)") + var ErrMisusedAlias = errors.NewKind(...) + var ErrOrderByColumnIndex = errors.NewKind("unknown column %d in order by clause") + var ErrProjectTuple = errors.NewKind("selected field %d should have 1 column, but has %d") + var ErrSubqueryColumns = errors.NewKind("subquery expressions can only return a single column") + var ErrUnknownIndexColumns = errors.NewKind("unknown columns to index for table %q: %s") + var ErrValidationGroupBy = errors.NewKind("GroupBy aggregate expression '%v' doesn't appear in the grouping columns") + var ErrValidationOrderBy = errors.NewKind("OrderBy does not support aggregation expressions") + var ErrValidationResolved = errors.NewKind("plan is not resolved because of node '%T'") + var ErrValidationSchemaSource = errors.NewKind("one or more schema sources are empty") + var OnceAfterAll = []Rule + var OnceAfterDefault = []Rule + var OnceBeforeDefault = []Rule + var ParallelQueryCounter = discard.NewCounter() + type Analyzer struct + Batches []*Batch + Catalog *sql.Catalog + Debug bool + Parallelism int + func NewDefault(c *sql.Catalog) *Analyzer + func (a *Analyzer) Analyze(ctx *sql.Context, n sql.Node) (sql.Node, error) + func (a *Analyzer) Log(msg string, args ...interface{}) + type Batch struct + Desc string + Iterations int + Rules []Rule + func (b *Batch) Eval(ctx *sql.Context, a *Analyzer, n sql.Node) (sql.Node, error) + type Builder struct + func NewBuilder(c *sql.Catalog) *Builder + func (ab *Builder) AddPostAnalyzeRule(name string, fn RuleFunc) *Builder + func (ab *Builder) AddPostValidationRule(name string, fn RuleFunc) *Builder + func (ab *Builder) AddPreAnalyzeRule(name string, fn RuleFunc) *Builder + func (ab *Builder) AddPreValidationRule(name string, fn RuleFunc) *Builder + func (ab *Builder) Build() *Analyzer + func (ab *Builder) WithDebug() *Builder + func (ab *Builder) WithParallelism(parallelism int) *Builder + type Rule struct + Apply RuleFunc + Name string + type RuleFunc func(*sql.Context, *Analyzer, sql.Node) (sql.Node, error)