cockroach: Index | Files

package transform

import ""


Package Files

aggregates.go expr_transform.go

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.

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 37 packages. Updated 2020-06-28. Refresh now. Tools for package owners.