cockroach: github.com/cockroachdb/cockroach/pkg/sql/opt/testutils/testexpr Index | Files

package testexpr

import "github.com/cockroachdb/cockroach/pkg/sql/opt/testutils/testexpr"

Index

Package Files

test_expr.go

type Instance Uses

type Instance struct {
    Rel      *props.Relational
    Required *physical.Required
    Provided *physical.Provided
    Priv     interface{}

    // We embed a RelExpr to provide implementation for the unexported methods of
    // RelExpr. This should not be initialized (resulting in a panic if any of
    // those methods are called).
    memo.RelExpr
}

Instance is a dummy RelExpr that contains various properties that can be extracted via that interface. It can be initialized with whatever subset of fields are required for the particular test; for example:

e := &testexpr.Instance{
  Rel: &props.Relational{...},
  Provided: &physical.Provided{...},
}

func (*Instance) Child Uses

func (e *Instance) Child(nth int) opt.Expr

Child is part of the RelExpr interface.

func (*Instance) ChildCount Uses

func (e *Instance) ChildCount() int

ChildCount is part of the RelExpr interface.

func (*Instance) Cost Uses

func (e *Instance) Cost() memo.Cost

Cost is part of the RelExpr interface.

func (*Instance) FirstExpr Uses

func (e *Instance) FirstExpr() memo.RelExpr

FirstExpr is part of the RelExpr interface.

func (*Instance) Memo Uses

func (e *Instance) Memo() *memo.Memo

Memo is part of the RelExpr interface.

func (*Instance) NextExpr Uses

func (e *Instance) NextExpr() memo.RelExpr

NextExpr is part of the RelExpr interface.

func (*Instance) Op Uses

func (e *Instance) Op() opt.Operator

Op is part of the RelExpr interface.

func (*Instance) Private Uses

func (e *Instance) Private() interface{}

Private is part of the RelExpr interface.

func (*Instance) ProvidedPhysical Uses

func (e *Instance) ProvidedPhysical() *physical.Provided

ProvidedPhysical is part of the RelExpr interface.

func (*Instance) Relational Uses

func (e *Instance) Relational() *props.Relational

Relational is part of the RelExpr interface.

func (*Instance) RequiredPhysical Uses

func (e *Instance) RequiredPhysical() *physical.Required

RequiredPhysical is part of the RelExpr interface.

func (*Instance) SetChild Uses

func (e *Instance) SetChild(nth int, child opt.Expr)

SetChild is part of the RelExpr interface.

func (*Instance) String Uses

func (e *Instance) String() string

String is part of the RelExpr interface.

Package testexpr imports 4 packages (graph). Updated 2019-07-24. Refresh now. Tools for package owners.