import "github.com/cockroachdb/cockroach/pkg/sql/opt/testutils/testexpr"
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{...}, }
Child is part of the RelExpr interface.
ChildCount is part of the RelExpr interface.
Cost is part of the RelExpr interface.
FirstExpr is part of the RelExpr interface.
Memo is part of the RelExpr interface.
NextExpr is part of the RelExpr interface.
Op is part of the RelExpr interface.
Private is part of the RelExpr interface.
ProvidedPhysical is part of the RelExpr interface.
func (e *Instance) Relational() *props.Relational
Relational is part of the RelExpr interface.
RequiredPhysical is part of the RelExpr interface.
SetChild is part of the RelExpr interface.
String is part of the RelExpr interface.
Package testexpr imports 4 packages (graph). Updated 2019-07-24. Refresh now. Tools for package owners.