package
20.2.19+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# README
The opt
package defines common high-level interfaces and classes that multiple
sub-packages share. None of these definitions depend on any sub-packages, so all
sub-packages can therefore depend on opt
without causing cyclical dependencies
(which Go does not allow).
# Packages
Package bench houses benchmarks for the SQL optimizer.
Package cat contains interfaces that are used by the query optimizer to avoid including specifics of sqlbase structures in the opt code.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package ordering contains operator-specific logic related to orderings - whether
ops can provide Required orderings, what orderings do they need to require from
their children, etc.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
AggregateIgnoresDuplicates returns true if the output of the given aggregate operator does not change when duplicate rows are added to the input.
AggregateIgnoresNulls returns true if the given aggregate operator ignores rows where its first argument evaluates to NULL.
AggregateIsNeverNull returns true if the given aggregate operator never returns NULL, even if the input is empty, or one more more inputs are NULL.
AggregateIsNeverNullOnNonNullInput returns true if the given aggregate operator never returns NULL when the input set contains at least one non-NULL value.
AggregateIsNullOnEmpty returns true if the given aggregate operator returns NULL when the input set contains no values.
AggregatesCanMerge returns true if the given inner and outer operators can be replaced with a single equivalent operator, assuming the outer operator is aggregating on the inner.
BoolOperatorRequiresNotNullArgs returns true if the operator can never evaluate to true if one of its children is NULL.
ColSetToList converts a column id set to a list, in column id order.
DepByID is used with AddDependency when the data source was looked up by ID.
DepByName is used with AddDependency when the data source was looked up using a data source name.
JoinTypeToUseCounter returns the JoinTypeXyzUseCounter for the given join operator.
MakeColSet returns a set initialized with the given values.
MakeOrderingColumn initializes an ordering column with a ColumnID and a flag indicating whether the direction is descending.
NewTableAnnID allocates a unique annotation identifier that is used to associate arbitrary data with table metadata.
ScalarOperatorTransmitsNulls returns true if the given scalar operator always returns NULL when at least one of its inputs is NULL.
TranslateColSet is used to translate a ColSet from one set of column IDs to an equivalent set.
# Constants
DefaultJoinOrderLimit denotes the default limit on the number of joins to reorder.
Enumeration of all manual rule names.
MaxReorderJoinsLimit is the maximum number of joins which can be reordered.
NumManualRules tracks the number of manually-defined rules.
Enumeration of all manual rule names.
SaveTablesDatabase is the name of the database where tables created by the saveTableNode are stored.
Enumeration of all manual rule names.
Enumeration of all manual rule names.
# Variables
AggregateOpReverseMap maps from an optimizer operator type to the name of an aggregation function.
BinaryOpReverseMap maps from an optimizer operator type to a semantic tree binary operator type.
ComparisonOpMap maps from a semantic tree comparison operator type to an optimizer operator type.
ComparisonOpReverseMap maps from an optimizer operator type to a semantic tree comparison operator type.
NegateOpMap maps from a comparison operator type to its negated operator type, as if the Not operator was applied to it.
OpTelemetryCounters stores telemetry counters for operators marked with the "Telemetry" tag.
UnaryOpReverseMap maps from an optimizer operator type to a semantic tree unary operator type.
WindowOpReverseMap maps from an optimizer operator type to the name of a window function.
# Structs
AliasedColumn specifies the label and id of a column.
ColSet efficiently stores an unordered set of column ids.
ColumnMeta stores information about one of the columns stored in the metadata.
MDDepName stores either the unresolved DataSourceName or the StableID from the query that was used to resolve a data source.
Metadata assigns unique ids to the columns, tables, and other metadata used for global identification within the scope of a particular query.
TableMeta stores information about one of the tables stored in the metadata.
ViewDep contains information about a view dependency.
# Interfaces
Expr is a node in an expression tree.
MutableExpr is implemented by expressions that allow their children to be updated.
OpaqueMetadata is an object stored in OpaqueRelExpr and passed through to the exec factory.
ScalarExpr is a scalar expression, which is an expression that returns a primitive-typed value like boolean or string rather than rows and columns.
# Type aliases
ColList is a list of column ids.
ColMap provides a 1:1 mapping from one column id to another.
ColumnID uniquely identifies the usage of a column within the scope of a query.
Operator describes the type of operation that a memo expression performs.
Ordering defines the order of rows provided or required by an operator.
OrderingColumn is the ColumnID for a column that is part of an ordering, except that it can be negated to indicate a descending ordering on that column.
OrderingSet is a set of orderings, with the restriction that no ordering is a prefix of another ordering in the set.
RuleName enumerates the names of all the optimizer rules.
ScalarID is the type of the memo-unique identifier given to every scalar expression.
SchemaID uniquely identifies the usage of a schema within the scope of a query.
SequenceID uniquely identifies the usage of a sequence within the scope of a query.
TableAnnID uniquely identifies an annotation on an instance of table metadata.
TableID uniquely identifies the usage of a table within the scope of a query.
UniqueID should be used to disambiguate multiple uses of an expression within the scope of a query.
ViewDeps contains information about the dependencies of a view.
WithID uniquely identifies a With expression within the scope of a query.