cockroach: Index | Files

package idxconstraint

import ""


Package Files


type Instance Uses

type Instance struct {
    // contains filtered or unexported fields

Instance is used to generate index constraints from a scalar boolean filter expression.

Sample usage:

var ic Instance
if err := ic.Init(...); err != nil {
spans, ok := ic.Spans()
remFilterGroup := ic.RemainingFilter()
remFilter := o.Optimize(remFilterGroup, &opt.PhysicalProps{})

func (*Instance) AllInvertedIndexConstraints Uses

func (ic *Instance) AllInvertedIndexConstraints() ([]*constraint.Constraint, error)

AllInvertedIndexConstraints returns all constraints that can be created on the specified inverted index. Only works for inverted indexes.

func (*Instance) Constraint Uses

func (ic *Instance) Constraint() *constraint.Constraint

Constraint returns the constraint created by Init. If Init wasn't called, the result is nil.

func (*Instance) Init Uses

func (ic *Instance) Init(
    filters memo.FiltersExpr,
    columns []opt.OrderingColumn,
    notNullCols opt.ColSet,
    isInverted bool,
    evalCtx *tree.EvalContext,
    factory *norm.Factory,

Init processes the filter and calculates the spans.

func (*Instance) RemainingFilters Uses

func (ic *Instance) RemainingFilters() memo.FiltersExpr

RemainingFilters calculates a simplified FiltersExpr that needs to be applied within the returned Spans.

Package idxconstraint imports 12 packages (graph) and is imported by 2 packages. Updated 2019-08-10. Refresh now. Tools for package owners.