Documentation
¶
Index ¶
- func BuildFilters(t *testing.T, f *norm.Factory, semaCtx *tree.SemaContext, ...) memo.FiltersExpr
- func BuildQuery(t *testing.T, o *xform.Optimizer, catalog cat.Catalog, ...)
- func BuildScalar(t *testing.T, f *norm.Factory, semaCtx *tree.SemaContext, ...) opt.ScalarExpr
- func GetTestFiles(tb testing.TB, testdataGlob string) []string
- type ScalarVars
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildFilters ¶
func BuildFilters( t *testing.T, f *norm.Factory, semaCtx *tree.SemaContext, evalCtx *tree.EvalContext, input string, ) memo.FiltersExpr
BuildFilters builds the given input string as a FiltersExpr and returns it. Calls a subset of the normalization rules that would apply if these filters were built as part of a Select or Join.
func BuildQuery ¶
func BuildQuery( t *testing.T, o *xform.Optimizer, catalog cat.Catalog, evalCtx *tree.EvalContext, sql string, )
BuildQuery initializes an optimizer and builds the given sql statement.
func BuildScalar ¶
func BuildScalar( t *testing.T, f *norm.Factory, semaCtx *tree.SemaContext, evalCtx *tree.EvalContext, input string, ) opt.ScalarExpr
BuildScalar builds the given input string as a ScalarExpr and returns it.
Types ¶
type ScalarVars ¶
type ScalarVars struct {
// contains filtered or unexported fields
}
ScalarVars is a helper used to populate the metadata with specified columns, useful for tests involving scalar expressions.
func (*ScalarVars) ComputedCols ¶
func (sv *ScalarVars) ComputedCols() map[opt.ColumnID]tree.Expr
ComputedCols returns a map of computed column expressions.
func (*ScalarVars) Init ¶
func (sv *ScalarVars) Init(md *opt.Metadata, vars []string) error
Init parses variables definition strings, adds new columns to the metadata, and initializes the ScalarVars.
Each definition string is of the form:
"<var-name> type1 [not null]
The not-null columns can be retrieved via NotNullCols().
func (*ScalarVars) NotNullCols ¶
func (sv *ScalarVars) NotNullCols() opt.ColSet
NotNullCols returns the columns that correspond to not null variables.