transform

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExprTransformContext

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

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

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

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

IsAggregateVisitor checks if walked expressions contain aggregate functions.

func (*IsAggregateVisitor) VisitPost

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

VisitPost satisfies the Visitor interface.

func (*IsAggregateVisitor) VisitPre

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

VisitPre satisfies the Visitor interface.

Jump to

Keyboard shortcuts

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