cockroach: github.com/cockroachdb/cockroach/pkg/sql/sem/transform Index | Files

package transform

import "github.com/cockroachdb/cockroach/pkg/sql/sem/transform"

Index

Package Files

aggregates.go expr_transform.go window.go

type ContainsWindowVisitor Uses

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

ContainsWindowVisitor checks if walked expressions contain window functions.

func (*ContainsWindowVisitor) ContainsWindowFunc Uses

func (v *ContainsWindowVisitor) ContainsWindowFunc(expr tree.Expr) bool

ContainsWindowFunc determines if an Expr contains a window function.

func (*ContainsWindowVisitor) VisitPost Uses

func (*ContainsWindowVisitor) VisitPost(expr tree.Expr) tree.Expr

VisitPost satisfies the Visitor interface.

func (*ContainsWindowVisitor) VisitPre Uses

func (v *ContainsWindowVisitor) VisitPre(expr tree.Expr) (recurse bool, newExpr tree.Expr)

VisitPre satisfies the Visitor interface.

type ExprTransformContext Uses

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

ExprTransformContext supports the methods that test expression properties and can normalize expressions, defined below. This should be used in planner instance to avoid re-allocation of these visitors between uses.

func (*ExprTransformContext) AggregateInExpr Uses

func (t *ExprTransformContext) AggregateInExpr(
    expr tree.Expr, searchPath sessiondata.SearchPath,
) bool

AggregateInExpr determines if an Expr contains an aggregate function. TODO(knz/radu): this is not the right way to go about checking these things. Instead whatever analysis occurs prior on the expression should collect scalar properties (see tree.ScalarProperties) and then the collected properties should be tested directly.

func (*ExprTransformContext) NormalizeExpr Uses

func (t *ExprTransformContext) NormalizeExpr(
    ctx *tree.EvalContext, typedExpr tree.TypedExpr,
) (tree.TypedExpr, error)

NormalizeExpr is a wrapper around EvalContex.NormalizeExpr which avoids allocation of a normalizeVisitor. See normalize.go for details.

func (*ExprTransformContext) WindowFuncInExpr Uses

func (t *ExprTransformContext) WindowFuncInExpr(expr tree.Expr) bool

WindowFuncInExpr determines if an Expr contains a window function, using the Parser's embedded visitor. TODO(knz/radu): this is not the right way to go about checking these things. Instead whatever analysis occurs prior on the expression should collect scalar properties (see tree.ScalarProperties) and then the collected properties should be tested directly.

type IsAggregateVisitor Uses

type IsAggregateVisitor struct {
    Aggregated bool
    // contains filtered or unexported fields
}

IsAggregateVisitor checks if walked expressions contain aggregate functions.

func (*IsAggregateVisitor) VisitPost Uses

func (*IsAggregateVisitor) VisitPost(expr tree.Expr) tree.Expr

VisitPost satisfies the Visitor interface.

func (*IsAggregateVisitor) VisitPre Uses

func (v *IsAggregateVisitor) VisitPre(expr tree.Expr) (recurse bool, newExpr tree.Expr)

VisitPre satisfies the Visitor interface.

Package transform imports 2 packages (graph) and is imported by 12 packages. Updated 2019-07-12. Refresh now. Tools for package owners.