package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
MakeSelectivity initializes and validates a float64 to ensure it is in a valid range.
MakeSelectivityFromFraction calculates selectivity as a fraction of a and b if a is less than b and returns OneSelectivity otherwise..
MaxSelectivity returns the larger value of two selectivities.
MinSelectivity returns the smaller value of two selectivities.
ParseOrdering parses a simple opt.Ordering; for example: "+1,-3".
ParseOrderingChoice parses the string representation of an OrderingChoice for testing purposes.
# Constants
HasHoistableSubquery is set when the Scalar.Rule.HasHoistableSubquery is populated.
InterestingOrderings is set when the Relational.Rule.InterestingOrderings field is populated.
MultiplicityIndeterminateVal indicates that no guarantees can be made about the number of times any given input row will be matched by the join filters.
MultiplicityNotDuplicatedVal indicates that the join will not match any input rows more than once.
MultiplicityPreservedVal indicates that the join filters will match all left rows at least once.
PruneCols is set when the Relational.Rule.PruneCols field is populated.
RejectNullCols is set when the Relational.Rule.RejectNullCols field is populated.
RestrictedInterestingOrderings is set when the Relational.Rule.RestrictedInterestingOrderings field is populated.
UnfilteredCols is set when the Relational.Rule.UnfilteredCols field is populated.
WithUses is set when the Shared.Rule.WithUses field is populated.
# Variables
AnyCardinality indicates that any number of rows can be returned by an expression.
OneCardinality indicates that exactly one row will be returned by expression.
OneSelectivity is used in cases where selectivity is known to be one, i.e.
ZeroCardinality indicates that no rows will be returned by expression.
ZeroSelectivity is used in cases where selectivity is known to be zero, i.e.
# Structs
Cardinality is the number of rows that can be returned by a relational expression.
ColStatsMap stores a set of column statistics, each of which is keyed by the set of columns over which that statistic is defined.
ColumnStatistic is a collection of statistics that applies to a particular set of columns.
EquivGroups describes a set of equivalence groups of columns.
FuncDepSet is a set of functional dependencies (FDs) that encode useful relationships between columns in a base or derived relation.
Histogram captures the distribution of values for a particular column within a relational expression.
JoinMultiplicity stores properties that allow guarantees to be made about how a join will affect rows from its inputs.
OrderingChoice defines the set of possible row orderings that are provided or required by an operator.
OrderingColumnChoice specifies the set of columns which can form one of the columns in the sort key, as well as the direction of that column (ascending or descending).
Relational properties describe the content and characteristics of relational data returned by all expression variants within a memo group.
RestrictedInterestingOrdering is an interesting ordering that has been restricted to a set of columns.
Scalar properties are logical properties that are computed for scalar expressions that return primitive-valued types.
Selectivity is a value is within the range of [epsilon, 1.0] representing the estimated fraction of rows that pass a given condition.
Shared are properties that are shared by both relational and scalar expressions.
Statistics is a collection of measurements and statistics that is used by the coster to estimate the cost of expressions.
WithUseInfo contains information about the usage of a specific WithID.
# Type aliases
AvailableRuleProps is a bit set that indicates when lazily-populated Rule properties are initialized and ready for use.
ColumnStatistics is a slice of pointers to ColumnStatistic values.
MultiplicityValue is a bit field that describes whether a join's filters match all input rows at least once, as well as whether the filters match all input rows at most once.
OrderingSet is a set of orderings, with the restriction that no ordering is a prefix of another ordering in the set.
VolatilitySet tracks the set of operator volatilities contained inside an expression.
WithUsesMap stores information about each WithScan referencing an outside WithID, grouped by each WithID.