package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# README
Norm Layout
This directory contains definitions for the normalization rules, their custom helper functions, and their test files. There is a .opt file for each operator containing the rules that match that operator. For every .opt file, there is a test file in testdata that contains tests for each normalization rule. Custom match and replace functions which are only used in one .opt file are kept in the corresponding _funcs.go file. Functions which are used by multiple different rules or are general enough to be reusable belong in general_funcs.go.
# Functions
CombineComputedColFilters is a generalized version of ComputedColFilters, which seeks to fold computed column expressions using values from single-key constraint spans in order to build new predicates on those computed columns and AND them with predicates built from the constraint span key used to compute the computed column value.
DeriveRejectNullCols returns the set of columns that are candidates for NULL rejection filter pushdown.
MakeBindingPropsForRecursiveCTE makes a Relational struct that applies to all iterations of a recursive CTE.
# Structs
CustomFuncs contains all the custom match and replace functions used by the normalization rules.
Factory constructs a normalized expression tree within the memo.
FoldingControl is used to control whether normalization rules allow constant folding of volatility.Stable operators.
# Type aliases
AppliedRuleFunc defines the callback function for the NotifyOnAppliedRule event supported by the optimizer and factory.
MatchedRuleFunc defines the callback function for the NotifyOnMatchedRule event supported by the optimizer and factory.
ReplaceFunc is the callback function passed to the Factory.Replace method.