Documentation ¶
Index ¶
- Constants
- Variables
- type AdvancedExtension
- type AggRelMeasure
- type AggregateRel
- func (ar *AggregateRel) Copy(newInputs ...Rel) (Rel, error)
- func (ar *AggregateRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, newInputs ...Rel) (Rel, error)
- func (ar *AggregateRel) GetAdvancedExtension() *extensions.AdvancedExtension
- func (ar *AggregateRel) GetInputs() []Rel
- func (ar *AggregateRel) Groupings() [][]expr.Expression
- func (ar *AggregateRel) Input() Rel
- func (ar *AggregateRel) Measures() []AggRelMeasure
- func (ar *AggregateRel) RecordType() types.RecordType
- func (ar *AggregateRel) Remap(mapping ...int32) (Rel, error)
- func (ar *AggregateRel) ToProto() *proto.Rel
- func (ar *AggregateRel) ToProtoPlanRel() *proto.PlanRel
- type ArrowReadOptions
- type BiRel
- type Builder
- type CrossRel
- func (c *CrossRel) Copy(newInputs ...Rel) (Rel, error)
- func (c *CrossRel) CopyWithExpressionRewrite(_ RewriteFunc, newInputs ...Rel) (Rel, error)
- func (c *CrossRel) GetAdvancedExtension() *extensions.AdvancedExtension
- func (c *CrossRel) GetInputs() []Rel
- func (c *CrossRel) Left() Rel
- func (c *CrossRel) RecordType() types.RecordType
- func (c *CrossRel) Remap(mapping ...int32) (Rel, error)
- func (c *CrossRel) Right() Rel
- func (c *CrossRel) ToProto() *proto.Rel
- func (c *CrossRel) ToProtoPlanRel() *proto.PlanRel
- type DwrfReadOptions
- type ExtensionLeafRel
- func (el *ExtensionLeafRel) Copy(_ ...Rel) (Rel, error)
- func (el *ExtensionLeafRel) CopyWithExpressionRewrite(_ RewriteFunc, _ ...Rel) (Rel, error)
- func (el *ExtensionLeafRel) Detail() *anypb.Any
- func (el *ExtensionLeafRel) GetInputs() []Rel
- func (el *ExtensionLeafRel) RecordType() types.RecordType
- func (el *ExtensionLeafRel) Remap(mapping ...int32) (Rel, error)
- func (el *ExtensionLeafRel) ToProto() *proto.Rel
- func (el *ExtensionLeafRel) ToProtoPlanRel() *proto.PlanRel
- type ExtensionMultiRel
- func (em *ExtensionMultiRel) Copy(newInputs ...Rel) (Rel, error)
- func (em *ExtensionMultiRel) CopyWithExpressionRewrite(_ RewriteFunc, newInputs ...Rel) (Rel, error)
- func (em *ExtensionMultiRel) Detail() *anypb.Any
- func (em *ExtensionMultiRel) GetInputs() []Rel
- func (em *ExtensionMultiRel) Inputs() []Rel
- func (em *ExtensionMultiRel) RecordType() types.RecordType
- func (em *ExtensionMultiRel) Remap(mapping ...int32) (Rel, error)
- func (em *ExtensionMultiRel) ToProto() *proto.Rel
- func (em *ExtensionMultiRel) ToProtoPlanRel() *proto.PlanRel
- type ExtensionReadOptions
- type ExtensionSingleRel
- func (es *ExtensionSingleRel) Copy(newInputs ...Rel) (Rel, error)
- func (es *ExtensionSingleRel) CopyWithExpressionRewrite(_ RewriteFunc, newInputs ...Rel) (Rel, error)
- func (es *ExtensionSingleRel) Detail() *anypb.Any
- func (es *ExtensionSingleRel) GetInputs() []Rel
- func (es *ExtensionSingleRel) Input() Rel
- func (es *ExtensionSingleRel) RecordType() types.RecordType
- func (es *ExtensionSingleRel) Remap(mapping ...int32) (Rel, error)
- func (es *ExtensionSingleRel) ToProto() *proto.Rel
- func (es *ExtensionSingleRel) ToProtoPlanRel() *proto.PlanRel
- type ExtensionTableReadRel
- func (b *ExtensionTableReadRel) BaseSchema() types.NamedStruct
- func (b *ExtensionTableReadRel) BestEffortFilter() expr.Expression
- func (e *ExtensionTableReadRel) Copy(_ ...Rel) (Rel, error)
- func (e *ExtensionTableReadRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, _ ...Rel) (Rel, error)
- func (e *ExtensionTableReadRel) Detail() *anypb.Any
- func (b *ExtensionTableReadRel) Filter() expr.Expression
- func (b *ExtensionTableReadRel) GetAdvancedExtension() *extensions.AdvancedExtension
- func (b *ExtensionTableReadRel) GetInputs() []Rel
- func (b *ExtensionTableReadRel) Projection() *expr.MaskExpression
- func (b *ExtensionTableReadRel) RecordType() types.RecordType
- func (e *ExtensionTableReadRel) Remap(mapping ...int32) (Rel, error)
- func (b *ExtensionTableReadRel) SetProjection(p *expr.MaskExpression)
- func (e *ExtensionTableReadRel) ToProto() *proto.Rel
- func (e *ExtensionTableReadRel) ToProtoPlanRel() *proto.PlanRel
- type FetchRel
- func (f *FetchRel) Copy(newInputs ...Rel) (Rel, error)
- func (f *FetchRel) CopyWithExpressionRewrite(_ RewriteFunc, newInputs ...Rel) (Rel, error)
- func (f *FetchRel) Count() int64
- func (f *FetchRel) GetAdvancedExtension() *extensions.AdvancedExtension
- func (f *FetchRel) GetInputs() []Rel
- func (f *FetchRel) Input() Rel
- func (f *FetchRel) Offset() int64
- func (f *FetchRel) RecordType() types.RecordType
- func (f *FetchRel) Remap(mapping ...int32) (Rel, error)
- func (f *FetchRel) ToProto() *proto.Rel
- func (f *FetchRel) ToProtoPlanRel() *proto.PlanRel
- type FileFormat
- type FileOrFiles
- type FilterRel
- func (fr *FilterRel) Condition() expr.Expression
- func (fr *FilterRel) Copy(newInputs ...Rel) (Rel, error)
- func (fr *FilterRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, newInputs ...Rel) (Rel, error)
- func (fr *FilterRel) GetAdvancedExtension() *extensions.AdvancedExtension
- func (fr *FilterRel) GetInputs() []Rel
- func (fr *FilterRel) Input() Rel
- func (fr *FilterRel) RecordType() types.RecordType
- func (fr *FilterRel) Remap(mapping ...int32) (Rel, error)
- func (fr *FilterRel) ToProto() *proto.Rel
- func (fr *FilterRel) ToProtoPlanRel() *proto.PlanRel
- type HashJoinRel
- func (hr *HashJoinRel) Copy(newInputs ...Rel) (Rel, error)
- func (hr *HashJoinRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, newInputs ...Rel) (Rel, error)
- func (hr *HashJoinRel) GetAdvancedExtension() *extensions.AdvancedExtension
- func (hr *HashJoinRel) GetInputs() []Rel
- func (hr *HashJoinRel) Left() Rel
- func (hr *HashJoinRel) LeftKeys() []*expr.FieldReference
- func (hr *HashJoinRel) PostJoinFilter() expr.Expression
- func (hr *HashJoinRel) RecordType() types.RecordType
- func (hr *HashJoinRel) Remap(mapping ...int32) (Rel, error)
- func (hr *HashJoinRel) Right() Rel
- func (hr *HashJoinRel) RightKeys() []*expr.FieldReference
- func (hr *HashJoinRel) ToProto() *proto.Rel
- func (hr *HashJoinRel) ToProtoPlanRel() *proto.PlanRel
- func (hr *HashJoinRel) Type() HashMergeJoinType
- type HashMergeJoinType
- type Hint
- type JoinRel
- func (j *JoinRel) Copy(newInputs ...Rel) (Rel, error)
- func (j *JoinRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, newInputs ...Rel) (Rel, error)
- func (j *JoinRel) Expr() expr.Expression
- func (j *JoinRel) GetAdvancedExtension() *extensions.AdvancedExtension
- func (j *JoinRel) GetInputs() []Rel
- func (j *JoinRel) JoinedRecordType() types.RecordType
- func (j *JoinRel) Left() Rel
- func (j *JoinRel) PostJoinFilter() expr.Expression
- func (j *JoinRel) RecordType() types.RecordType
- func (j *JoinRel) Remap(mapping ...int32) (Rel, error)
- func (j *JoinRel) Right() Rel
- func (j *JoinRel) ToProto() *proto.Rel
- func (j *JoinRel) ToProtoPlanRel() *proto.PlanRel
- func (j *JoinRel) Type() JoinType
- type JoinType
- type LocalFileReadRel
- func (b *LocalFileReadRel) BaseSchema() types.NamedStruct
- func (b *LocalFileReadRel) BestEffortFilter() expr.Expression
- func (lf *LocalFileReadRel) Copy(_ ...Rel) (Rel, error)
- func (lf *LocalFileReadRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, _ ...Rel) (Rel, error)
- func (b *LocalFileReadRel) Filter() expr.Expression
- func (lf *LocalFileReadRel) GetAdvancedExtension() *extensions.AdvancedExtension
- func (b *LocalFileReadRel) GetInputs() []Rel
- func (lf *LocalFileReadRel) Item(i int) FileOrFiles
- func (b *LocalFileReadRel) Projection() *expr.MaskExpression
- func (b *LocalFileReadRel) RecordType() types.RecordType
- func (lf *LocalFileReadRel) Remap(mapping ...int32) (Rel, error)
- func (b *LocalFileReadRel) SetProjection(p *expr.MaskExpression)
- func (lf *LocalFileReadRel) ToProto() *proto.Rel
- func (lf *LocalFileReadRel) ToProtoPlanRel() *proto.PlanRel
- type MergeJoinRel
- func (mr *MergeJoinRel) Copy(newInputs ...Rel) (Rel, error)
- func (mr *MergeJoinRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, newInputs ...Rel) (Rel, error)
- func (mr *MergeJoinRel) GetAdvancedExtension() *extensions.AdvancedExtension
- func (mr *MergeJoinRel) GetInputs() []Rel
- func (mr *MergeJoinRel) Left() Rel
- func (mr *MergeJoinRel) LeftKeys() []*expr.FieldReference
- func (mr *MergeJoinRel) PostJoinFilter() expr.Expression
- func (mr *MergeJoinRel) RecordType() types.RecordType
- func (mr *MergeJoinRel) Remap(mapping ...int32) (Rel, error)
- func (mr *MergeJoinRel) Right() Rel
- func (mr *MergeJoinRel) RightKeys() []*expr.FieldReference
- func (mr *MergeJoinRel) ToProto() *proto.Rel
- func (mr *MergeJoinRel) ToProtoPlanRel() *proto.PlanRel
- func (mr *MergeJoinRel) Type() HashMergeJoinType
- type MultiRel
- type NamedTableReadRel
- func (b *NamedTableReadRel) BaseSchema() types.NamedStruct
- func (b *NamedTableReadRel) BestEffortFilter() expr.Expression
- func (n *NamedTableReadRel) Copy(_ ...Rel) (Rel, error)
- func (n *NamedTableReadRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, _ ...Rel) (Rel, error)
- func (b *NamedTableReadRel) Filter() expr.Expression
- func (b *NamedTableReadRel) GetAdvancedExtension() *extensions.AdvancedExtension
- func (b *NamedTableReadRel) GetInputs() []Rel
- func (n *NamedTableReadRel) NamedTableAdvancedExtension() *extensions.AdvancedExtension
- func (n *NamedTableReadRel) Names() []string
- func (b *NamedTableReadRel) Projection() *expr.MaskExpression
- func (n *NamedTableReadRel) RecordType() types.RecordType
- func (n *NamedTableReadRel) Remap(mapping ...int32) (Rel, error)
- func (b *NamedTableReadRel) SetProjection(p *expr.MaskExpression)
- func (n *NamedTableReadRel) ToProto() *proto.Rel
- func (n *NamedTableReadRel) ToProtoPlanRel() *proto.PlanRel
- type NamedTableWriteRel
- func (wr *NamedTableWriteRel) Copy(newInputs ...Rel) (Rel, error)
- func (wr *NamedTableWriteRel) CopyWithExpressionRewrite(_ RewriteFunc, newInputs ...Rel) (Rel, error)
- func (wr *NamedTableWriteRel) GetInputs() []Rel
- func (wr *NamedTableWriteRel) Input() Rel
- func (wr *NamedTableWriteRel) NamedTableAdvancedExtension() *extensions.AdvancedExtension
- func (wr *NamedTableWriteRel) Names() []string
- func (wr *NamedTableWriteRel) Op() WriteOp
- func (wr *NamedTableWriteRel) OutputMode() OutputMode
- func (wr *NamedTableWriteRel) RecordType() types.RecordType
- func (wr *NamedTableWriteRel) Remap(mapping ...int32) (Rel, error)
- func (wr *NamedTableWriteRel) TableSchema() types.NamedStruct
- func (wr *NamedTableWriteRel) ToProto() *proto.Rel
- func (wr *NamedTableWriteRel) ToProtoPlanRel() *proto.PlanRel
- type OrcReadOptions
- type OutputMode
- type ParquetReadOptions
- type PathType
- type Plan
- func (p *Plan) AdvancedExtension() AdvancedExtension
- func (p *Plan) ExpectedTypeURLs() []string
- func (p *Plan) ExtensionRegistry() expr.ExtensionRegistry
- func (p *Plan) GetNonRootRelations() (rels []Rel)
- func (p *Plan) GetRoots() (roots []*Root)
- func (p *Plan) Relations() []Relation
- func (p *Plan) ToProto() (*proto.Plan, error)
- func (p *Plan) Version() Version
- type ProjectRel
- func (p *ProjectRel) Copy(newInputs ...Rel) (Rel, error)
- func (p *ProjectRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, newInputs ...Rel) (Rel, error)
- func (p *ProjectRel) Expressions() []expr.Expression
- func (p *ProjectRel) GetAdvancedExtension() *extensions.AdvancedExtension
- func (p *ProjectRel) GetInputs() []Rel
- func (p *ProjectRel) Input() Rel
- func (p *ProjectRel) RecordType() types.RecordType
- func (p *ProjectRel) Remap(mapping ...int32) (Rel, error)
- func (p *ProjectRel) ToProto() *proto.Rel
- func (p *ProjectRel) ToProtoPlanRel() *proto.PlanRel
- type ReadRel
- type Rel
- type RelCommon
- type Relation
- type RewriteFunc
- type Root
- type RuntimeConstraint
- type SetOp
- type SetRel
- func (s *SetRel) Copy(newInputs ...Rel) (Rel, error)
- func (s *SetRel) CopyWithExpressionRewrite(_ RewriteFunc, newInputs ...Rel) (Rel, error)
- func (s *SetRel) GetAdvancedExtension() *extensions.AdvancedExtension
- func (s *SetRel) GetInputs() []Rel
- func (s *SetRel) Inputs() []Rel
- func (s *SetRel) Op() SetOp
- func (s *SetRel) RecordType() types.RecordType
- func (s *SetRel) Remap(mapping ...int32) (Rel, error)
- func (s *SetRel) ToProto() *proto.Rel
- func (s *SetRel) ToProtoPlanRel() *proto.PlanRel
- type SingleInputRel
- type SortRel
- func (sr *SortRel) Copy(newInputs ...Rel) (Rel, error)
- func (sr *SortRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, newInputs ...Rel) (Rel, error)
- func (sr *SortRel) GetAdvancedExtension() *extensions.AdvancedExtension
- func (sr *SortRel) GetInputs() []Rel
- func (sr *SortRel) Input() Rel
- func (sr *SortRel) RecordType() types.RecordType
- func (sr *SortRel) Remap(mapping ...int32) (Rel, error)
- func (sr *SortRel) Sorts() []expr.SortField
- func (sr *SortRel) ToProto() *proto.Rel
- func (sr *SortRel) ToProtoPlanRel() *proto.PlanRel
- type Stats
- type Version
- type VirtualTableReadRel
- func (b *VirtualTableReadRel) BaseSchema() types.NamedStruct
- func (b *VirtualTableReadRel) BestEffortFilter() expr.Expression
- func (v *VirtualTableReadRel) Copy(_ ...Rel) (Rel, error)
- func (v *VirtualTableReadRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, _ ...Rel) (Rel, error)
- func (b *VirtualTableReadRel) Filter() expr.Expression
- func (b *VirtualTableReadRel) GetAdvancedExtension() *extensions.AdvancedExtension
- func (b *VirtualTableReadRel) GetInputs() []Rel
- func (b *VirtualTableReadRel) Projection() *expr.MaskExpression
- func (b *VirtualTableReadRel) RecordType() types.RecordType
- func (v *VirtualTableReadRel) Remap(mapping ...int32) (Rel, error)
- func (b *VirtualTableReadRel) SetProjection(p *expr.MaskExpression)
- func (v *VirtualTableReadRel) ToProto() *proto.Rel
- func (v *VirtualTableReadRel) ToProtoPlanRel() *proto.PlanRel
- func (v *VirtualTableReadRel) Values() []expr.VirtualTableExpressionValue
- type WriteOp
Constants ¶
const ( JoinTypeUnspecified = proto.JoinRel_JOIN_TYPE_UNSPECIFIED JoinTypeInner = proto.JoinRel_JOIN_TYPE_INNER JoinTypeOuter = proto.JoinRel_JOIN_TYPE_OUTER JoinTypeLeft = proto.JoinRel_JOIN_TYPE_LEFT JoinTypeRight = proto.JoinRel_JOIN_TYPE_RIGHT JoinTypeLeftSemi = proto.JoinRel_JOIN_TYPE_LEFT_SEMI JoinTypeLeftAnti = proto.JoinRel_JOIN_TYPE_LEFT_ANTI JoinTypeLeftSingle = proto.JoinRel_JOIN_TYPE_LEFT_SINGLE JoinTypeRightSemi = proto.JoinRel_JOIN_TYPE_RIGHT_SEMI JoinTypeRightAnti = proto.JoinRel_JOIN_TYPE_RIGHT_ANTI JoinTypeRightSingle = proto.JoinRel_JOIN_TYPE_RIGHT_SINGLE )
const ( SetOpUnspecified = proto.SetRel_SET_OP_UNSPECIFIED SetOpMinusPrimary = proto.SetRel_SET_OP_MINUS_PRIMARY SetOpMinusMultiset = proto.SetRel_SET_OP_MINUS_MULTISET SetOpIntersectionPrimary = proto.SetRel_SET_OP_INTERSECTION_PRIMARY SetOpIntersectionMultiset = proto.SetRel_SET_OP_INTERSECTION_MULTISET SetOpUnionDistinct = proto.SetRel_SET_OP_UNION_DISTINCT SetOpUnionAll = proto.SetRel_SET_OP_UNION_ALL )
const ( WriteOpUnspecified = proto.WriteRel_WRITE_OP_UNSPECIFIED WriteOpInsert = proto.WriteRel_WRITE_OP_INSERT WriteOpDelete = proto.WriteRel_WRITE_OP_DELETE WriteOpUpdate = proto.WriteRel_WRITE_OP_UPDATE WriteOpCTAS = proto.WriteRel_WRITE_OP_CTAS )
const ( OutputModeUnspecified = proto.WriteRel_OUTPUT_MODE_UNSPECIFIED OutputModeNoOutput = proto.WriteRel_OUTPUT_MODE_NO_OUTPUT OutputModeModifiedRecords = proto.WriteRel_OUTPUT_MODE_MODIFIED_RECORDS )
const FETCH_COUNT_ALL_RECORDS = -1
Variables ¶
var CurrentVersion = types.Version{
MajorNumber: 0,
MinorNumber: 29,
PatchNumber: 0,
Producer: "substrait-go",
}
Functions ¶
This section is empty.
Types ¶
type AdvancedExtension ¶
type AggRelMeasure ¶
type AggRelMeasure struct {
// contains filtered or unexported fields
}
func (*AggRelMeasure) Filter ¶
func (am *AggRelMeasure) Filter() expr.Expression
func (*AggRelMeasure) Measure ¶
func (am *AggRelMeasure) Measure() *expr.AggregateFunction
func (*AggRelMeasure) ToProto ¶
func (am *AggRelMeasure) ToProto() *proto.AggregateRel_Measure
type AggregateRel ¶
type AggregateRel struct { RelCommon // contains filtered or unexported fields }
AggregateRel is a relational operator representing a GROUP BY aggregate.
func (*AggregateRel) CopyWithExpressionRewrite ¶
func (ar *AggregateRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, newInputs ...Rel) (Rel, error)
func (*AggregateRel) GetAdvancedExtension ¶
func (ar *AggregateRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*AggregateRel) GetInputs ¶
func (ar *AggregateRel) GetInputs() []Rel
func (*AggregateRel) Groupings ¶
func (ar *AggregateRel) Groupings() [][]expr.Expression
Groupings is a list of expression groupings that the aggregation measures should be calculated for.
func (*AggregateRel) Input ¶
func (ar *AggregateRel) Input() Rel
func (*AggregateRel) Measures ¶
func (ar *AggregateRel) Measures() []AggRelMeasure
func (*AggregateRel) RecordType ¶
func (ar *AggregateRel) RecordType() types.RecordType
func (*AggregateRel) ToProto ¶
func (ar *AggregateRel) ToProto() *proto.Rel
func (*AggregateRel) ToProtoPlanRel ¶
func (ar *AggregateRel) ToProtoPlanRel() *proto.PlanRel
type ArrowReadOptions ¶
type ArrowReadOptions proto.ReadRel_LocalFiles_FileOrFiles_ArrowReadOptions
type BiRel ¶
BiRel is a convenience interface representing any relation that takes exactly two input relations such as joins.
type Builder ¶
type Builder interface { // GetFunctionRef retrieves the function anchor reference for a given // function identified by its namespace and function name. This also // ensures that any plans built from this builder will contain this // function anchor in its extensions section. GetFunctionRef(nameSpace, key string) types.FunctionRef // Construct a user-defined type from the extension namespace and typename, // along with optional type parameters. It will add the type to the internal // extension set if it doesn't already exist and assign it a type reference. UserDefinedType(nameSpace, typeName string, params ...types.TypeParam) types.UserDefinedType // RootFieldRef constructs a Root Field Reference to the column of the input // relation indicated by the passed in index. This will ensure the output // type is properly propagated based on the reference. // // Will return an error if the index is < 0 or > the number of output fields. RootFieldRef(input Rel, index int32) (*expr.FieldReference, error) // JoinedRecordFieldRef constructs a root field reference for the full tuple of // the inputs to a join, to construct an expression that is viable to use as // the condition or post join filter for a join relation. JoinedRecordFieldRef(left, right Rel, index int32) (*expr.FieldReference, error) // ScalarFn constructs a ScalarFunction from the passed in namespace and // function name key. This is equivalent to calling expr.NewScalarFunc using // the builder's extension registry. An error will be returned if the indicated // function was not already in the extension collection the builder was created // with or if the arguments of the function don't match the provided argument // types. ScalarFn(nameSpace, key string, opts []*types.FunctionOption, args ...types.FuncArg) (*expr.ScalarFunction, error) // AggregateFn constructs an AggregateFunction from the passed in namespace and // function name key. This is equivalent to calling expr.NewAggregateFunc using // the builder's extension registry. An error will be returned if the indicated // function was not already in the extension collection the builder was created // with or if the arguments of the function don't match the provided argument // types. AggregateFn(nameSpace, key string, opts []*types.FunctionOption, args ...types.FuncArg) (*expr.AggregateFunction, error) // SortFields is a convenience method to construct a list of sort fields // from the column indices of an existing relation. This will return an error // if any of the indices are < 0 or > the number of columns in the output // of the relation. This will use types.SortAscNullsLast as the sort kind // for each field in the returned slice. SortFields(input Rel, indices ...int32) ([]expr.SortField, error) // Measure is a convenience method to construct the input for an Aggregate Rel // Consisting of the provided aggregate function and optional filter expression. Measure(measure *expr.AggregateFunction, filter expr.Expression) AggRelMeasure Project(input Rel, exprs ...expr.Expression) (*ProjectRel, error) // Deprecated: Use Project(...).Remap() instead. ProjectRemap(input Rel, remap []int32, exprs ...expr.Expression) (*ProjectRel, error) // Deprecated: Use AggregateColumns(...).Remap() instead. AggregateColumnsRemap(input Rel, remap []int32, measures []AggRelMeasure, groupByCols ...int32) (*AggregateRel, error) AggregateColumns(input Rel, measures []AggRelMeasure, groupByCols ...int32) (*AggregateRel, error) // Deprecated: Use AggregateExprs(...).Remap() instead. AggregateExprsRemap(input Rel, remap []int32, measures []AggRelMeasure, groups ...[]expr.Expression) (*AggregateRel, error) AggregateExprs(input Rel, measures []AggRelMeasure, groups ...[]expr.Expression) (*AggregateRel, error) // Deprecated: Use CreateTableAsSelect(...).Remap() instead. CreateTableAsSelectRemap(input Rel, remap []int32, tableName []string, schema types.NamedStruct) (*NamedTableWriteRel, error) CreateTableAsSelect(input Rel, tableName []string, schema types.NamedStruct) (*NamedTableWriteRel, error) // Deprecated: Use Cross(...).Remap() instead. CrossRemap(left, right Rel, remap []int32) (*CrossRel, error) Cross(left, right Rel) (*CrossRel, error) // FetchRemap constructs a fetch relation providing an offset (skipping some // number of rows) and a count (restricting output to a maximum number of // rows). If count is FETCH_COUNT_ALL_RECORDS (-1) all records will be // returned. Similar to Fetch but allows for reordering and restricting the // returned columns. // // Deprecated: Use Fetch(...).Remap() instead. FetchRemap(input Rel, offset, count int64, remap []int32) (*FetchRel, error) // Fetch constructs a fetch relation providing an offset (skipping some number of // rows) and a count (restricting output to a maximum number of rows). If count // is FETCH_COUNT_ALL_RECORDS (-1) all records will be returned. Fetch(input Rel, offset, count int64) (*FetchRel, error) // Deprecated: Use Filter(...).Remap() instead. FilterRemap(input Rel, condition expr.Expression, remap []int32) (*FilterRel, error) Filter(input Rel, condition expr.Expression) (*FilterRel, error) // Deprecated: Use JoinAndFilter(...).Remap() instead. JoinAndFilterRemap(left, right Rel, condition, postJoinFilter expr.Expression, joinType JoinType, remap []int32) (*JoinRel, error) // Deprecated: Use Fetch(...).Remap() instead. JoinAndFilter(left, right Rel, condition, postJoinFilter expr.Expression, joinType JoinType) (*JoinRel, error) // Deprecated: Use Join(...).Remap() instead. JoinRemap(left, right Rel, condition expr.Expression, joinType JoinType, remap []int32) (*JoinRel, error) Join(left, right Rel, condition expr.Expression, joinType JoinType) (*JoinRel, error) // Deprecated: Use NamedScan(...).Remap() instead. NamedScanRemap(tableName []string, schema types.NamedStruct, remap []int32) (*NamedTableReadRel, error) NamedScan(tableName []string, schema types.NamedStruct) *NamedTableReadRel // Deprecated: Use NamedWrite(...).Remap() instead. NamedWriteRemap(input Rel, op WriteOp, tableName []string, schema types.NamedStruct, remap []int32) (*NamedTableWriteRel, error) // NamedWrite performs the given write operation from the input relation over a named table. NamedWrite(input Rel, op WriteOp, tableName []string, schema types.NamedStruct) (*NamedTableWriteRel, error) // NamedInsert inserts data from the input relation into a named table. NamedInsert(input Rel, tableName []string, schema types.NamedStruct) (*NamedTableWriteRel, error) // NamedDelete deletes rows from a specified named table based on the // provided input relation, which typically includes conditions that filter // the rows to delete. NamedDelete(input Rel, tableName []string, schema types.NamedStruct) (*NamedTableWriteRel, error) // Deprecated: Use VirtualTable(...).Remap() instead. VirtualTableRemap(fields []string, remap []int32, values ...expr.StructLiteralValue) (*VirtualTableReadRel, error) VirtualTable(fields []string, values ...expr.StructLiteralValue) (*VirtualTableReadRel, error) // Deprecated: Use VirtualTableFromExpr(...).Remap() instead. VirtualTableFromExprRemap(fieldNames []string, remap []int32, values ...expr.VirtualTableExpressionValue) (*VirtualTableReadRel, error) VirtualTableFromExpr(fieldNames []string, values ...expr.VirtualTableExpressionValue) (*VirtualTableReadRel, error) // Deprecated: Use Sort(...).Remap() instead. SortRemap(input Rel, remap []int32, sorts ...expr.SortField) (*SortRel, error) Sort(input Rel, sorts ...expr.SortField) (*SortRel, error) // Deprecated: Use Set(...).Remap() instead. SetRemap(op SetOp, remap []int32, inputs ...Rel) (*SetRel, error) Set(op SetOp, inputs ...Rel) (*SetRel, error) // Plan constructs a new plan with the provided root relation and optionally // other relations. It will use the current substrait version of this // library as the plan substrait version. Plan(root Rel, rootNames []string, others ...Rel) (*Plan, error) // PlanWithTypes is the same as Plan, only it provides the ability to set // the list of expectedTypeURLs that indicate the different protobuf types // that may be in use with this plan for advanced extensions, optimizations, // and so on. PlanWithTypes(root Rel, rootNames []string, expectedTypeURLs []string, others ...Rel) (*Plan, error) // GetExprBuilder returns an expr.ExprBuilder that shares the extension // registry that this Builder uses. GetExprBuilder() *expr.ExprBuilder }
Builder is the base object for constructing the various elements of a plan. The intent is to create a single builder and then utilize it for all necessary constructions while building a full plan.
Any extensions that are referenced for functions or user defined types, etc. will be added to the internal extension set so that the final Plan when constructed will have the appropriate extension anchors and definitions. This will maintain consistency across the plan for the user without them having to manually do so.
func NewBuilder ¶
func NewBuilder(c *extensions.Collection) Builder
func NewBuilderDefault ¶
func NewBuilderDefault() Builder
type CrossRel ¶
type CrossRel struct { RelCommon // contains filtered or unexported fields }
CrossRel is a cartesian product relational operator of two tables.
func (*CrossRel) CopyWithExpressionRewrite ¶
func (c *CrossRel) CopyWithExpressionRewrite(_ RewriteFunc, newInputs ...Rel) (Rel, error)
func (*CrossRel) GetAdvancedExtension ¶
func (c *CrossRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*CrossRel) RecordType ¶
func (c *CrossRel) RecordType() types.RecordType
func (*CrossRel) ToProtoPlanRel ¶
type DwrfReadOptions ¶
type DwrfReadOptions proto.ReadRel_LocalFiles_FileOrFiles_DwrfReadOptions
type ExtensionLeafRel ¶
type ExtensionLeafRel struct { RelCommon // contains filtered or unexported fields }
ExtensionLeafRel is a stub to support extensions with zero inputs.
func (*ExtensionLeafRel) CopyWithExpressionRewrite ¶
func (el *ExtensionLeafRel) CopyWithExpressionRewrite(_ RewriteFunc, _ ...Rel) (Rel, error)
func (*ExtensionLeafRel) Detail ¶
func (el *ExtensionLeafRel) Detail() *anypb.Any
func (*ExtensionLeafRel) GetInputs ¶
func (el *ExtensionLeafRel) GetInputs() []Rel
func (*ExtensionLeafRel) RecordType ¶
func (el *ExtensionLeafRel) RecordType() types.RecordType
func (*ExtensionLeafRel) ToProto ¶
func (el *ExtensionLeafRel) ToProto() *proto.Rel
func (*ExtensionLeafRel) ToProtoPlanRel ¶
func (el *ExtensionLeafRel) ToProtoPlanRel() *proto.PlanRel
type ExtensionMultiRel ¶
type ExtensionMultiRel struct { RelCommon // contains filtered or unexported fields }
ExtensionMultiRel is a stub to support extensions with multiple inputs.
func (*ExtensionMultiRel) CopyWithExpressionRewrite ¶
func (em *ExtensionMultiRel) CopyWithExpressionRewrite(_ RewriteFunc, newInputs ...Rel) (Rel, error)
func (*ExtensionMultiRel) Detail ¶
func (em *ExtensionMultiRel) Detail() *anypb.Any
func (*ExtensionMultiRel) GetInputs ¶
func (em *ExtensionMultiRel) GetInputs() []Rel
func (*ExtensionMultiRel) Inputs ¶
func (em *ExtensionMultiRel) Inputs() []Rel
func (*ExtensionMultiRel) RecordType ¶
func (em *ExtensionMultiRel) RecordType() types.RecordType
func (*ExtensionMultiRel) ToProto ¶
func (em *ExtensionMultiRel) ToProto() *proto.Rel
func (*ExtensionMultiRel) ToProtoPlanRel ¶
func (em *ExtensionMultiRel) ToProtoPlanRel() *proto.PlanRel
type ExtensionReadOptions ¶
type ExtensionSingleRel ¶
type ExtensionSingleRel struct { RelCommon // contains filtered or unexported fields }
ExtensionSingleRel is a stub to support extensions with a single input.
func (*ExtensionSingleRel) CopyWithExpressionRewrite ¶
func (es *ExtensionSingleRel) CopyWithExpressionRewrite(_ RewriteFunc, newInputs ...Rel) (Rel, error)
func (*ExtensionSingleRel) Detail ¶
func (es *ExtensionSingleRel) Detail() *anypb.Any
func (*ExtensionSingleRel) GetInputs ¶
func (es *ExtensionSingleRel) GetInputs() []Rel
func (*ExtensionSingleRel) Input ¶
func (es *ExtensionSingleRel) Input() Rel
func (*ExtensionSingleRel) RecordType ¶
func (es *ExtensionSingleRel) RecordType() types.RecordType
func (*ExtensionSingleRel) Remap ¶
func (es *ExtensionSingleRel) Remap(mapping ...int32) (Rel, error)
func (*ExtensionSingleRel) ToProto ¶
func (es *ExtensionSingleRel) ToProto() *proto.Rel
func (*ExtensionSingleRel) ToProtoPlanRel ¶
func (es *ExtensionSingleRel) ToProtoPlanRel() *proto.PlanRel
type ExtensionTableReadRel ¶
type ExtensionTableReadRel struct {
// contains filtered or unexported fields
}
ExtensionTableReadRel is a stub type that can be used to extend and introduce new table types outside the specification by utilizing protobuf Any type.
func (*ExtensionTableReadRel) BaseSchema ¶
func (b *ExtensionTableReadRel) BaseSchema() types.NamedStruct
func (*ExtensionTableReadRel) BestEffortFilter ¶
func (b *ExtensionTableReadRel) BestEffortFilter() expr.Expression
func (*ExtensionTableReadRel) CopyWithExpressionRewrite ¶
func (e *ExtensionTableReadRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, _ ...Rel) (Rel, error)
func (*ExtensionTableReadRel) Detail ¶
func (e *ExtensionTableReadRel) Detail() *anypb.Any
func (*ExtensionTableReadRel) Filter ¶
func (b *ExtensionTableReadRel) Filter() expr.Expression
func (*ExtensionTableReadRel) GetAdvancedExtension ¶
func (b *ExtensionTableReadRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*ExtensionTableReadRel) Projection ¶
func (b *ExtensionTableReadRel) Projection() *expr.MaskExpression
func (*ExtensionTableReadRel) RecordType ¶
func (b *ExtensionTableReadRel) RecordType() types.RecordType
func (*ExtensionTableReadRel) Remap ¶
func (e *ExtensionTableReadRel) Remap(mapping ...int32) (Rel, error)
func (*ExtensionTableReadRel) SetProjection ¶
func (b *ExtensionTableReadRel) SetProjection(p *expr.MaskExpression)
func (*ExtensionTableReadRel) ToProto ¶
func (e *ExtensionTableReadRel) ToProto() *proto.Rel
func (*ExtensionTableReadRel) ToProtoPlanRel ¶
func (e *ExtensionTableReadRel) ToProtoPlanRel() *proto.PlanRel
type FetchRel ¶
type FetchRel struct { RelCommon // contains filtered or unexported fields }
FetchRel is a relational operator representing LIMIT/OFFSET or TOP type semantics.
func (*FetchRel) CopyWithExpressionRewrite ¶
func (f *FetchRel) CopyWithExpressionRewrite(_ RewriteFunc, newInputs ...Rel) (Rel, error)
func (*FetchRel) GetAdvancedExtension ¶
func (f *FetchRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*FetchRel) RecordType ¶
func (f *FetchRel) RecordType() types.RecordType
func (*FetchRel) ToProtoPlanRel ¶
type FileFormat ¶
type FileFormat interface {
// contains filtered or unexported methods
}
type FileOrFiles ¶
type FileOrFiles struct { PathType PathType Path string // PartIndex is the index of the partition that this item belongs to PartIndex uint64 // Start and Len are the start position and length of bytes to // read from this item. Start, Len uint64 Format FileFormat }
FileOrFiles represents the contents of a LocalFiles table. Many files consist of indivisible chunks (e.g. parquet row groups or CSV rows). If a slice partially selects an indivisible chunk then the consumer should employ some rule to decide which slice to include the chunk in. (e.g. include it in the slice that contains the midpoint of the chunk).
func (*FileOrFiles) ToProto ¶
func (f *FileOrFiles) ToProto() *proto.ReadRel_LocalFiles_FileOrFiles
type FilterRel ¶
type FilterRel struct { RelCommon // contains filtered or unexported fields }
FilterRel is a relational operator capturing simple filters ( as in the WHERE clause of a SQL query).
func (*FilterRel) Condition ¶
func (fr *FilterRel) Condition() expr.Expression
func (*FilterRel) CopyWithExpressionRewrite ¶
func (fr *FilterRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, newInputs ...Rel) (Rel, error)
func (*FilterRel) GetAdvancedExtension ¶
func (fr *FilterRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*FilterRel) RecordType ¶
func (fr *FilterRel) RecordType() types.RecordType
func (*FilterRel) ToProtoPlanRel ¶
type HashJoinRel ¶
type HashJoinRel struct { RelCommon // contains filtered or unexported fields }
HashJoinRel represents a relational operator to build a hash table out of the right input based on a set of join keys. It will then probe the hash table for incoming inputs, finding matches.
func (*HashJoinRel) CopyWithExpressionRewrite ¶
func (hr *HashJoinRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, newInputs ...Rel) (Rel, error)
func (*HashJoinRel) GetAdvancedExtension ¶
func (hr *HashJoinRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*HashJoinRel) GetInputs ¶
func (hr *HashJoinRel) GetInputs() []Rel
func (*HashJoinRel) Left ¶
func (hr *HashJoinRel) Left() Rel
func (*HashJoinRel) LeftKeys ¶
func (hr *HashJoinRel) LeftKeys() []*expr.FieldReference
func (*HashJoinRel) PostJoinFilter ¶
func (hr *HashJoinRel) PostJoinFilter() expr.Expression
func (*HashJoinRel) RecordType ¶
func (hr *HashJoinRel) RecordType() types.RecordType
func (*HashJoinRel) Right ¶
func (hr *HashJoinRel) Right() Rel
func (*HashJoinRel) RightKeys ¶
func (hr *HashJoinRel) RightKeys() []*expr.FieldReference
func (*HashJoinRel) ToProto ¶
func (hr *HashJoinRel) ToProto() *proto.Rel
func (*HashJoinRel) ToProtoPlanRel ¶
func (hr *HashJoinRel) ToProtoPlanRel() *proto.PlanRel
func (*HashJoinRel) Type ¶
func (hr *HashJoinRel) Type() HashMergeJoinType
type HashMergeJoinType ¶
type HashMergeJoinType int8
const ( HashMergeUnspecified HashMergeJoinType = iota HashMergeInner HashMergeOuter HashMergeLeft HashMergeRight HashMergeLeftSemi HashMergeRightSemi HashMergeLeftAnti HashMergeRightAnti )
type Hint ¶
type Hint = proto.RelCommon_Hint
type JoinRel ¶
type JoinRel struct { RelCommon // contains filtered or unexported fields }
JoinRel is a binary Join relational operator representing left-join-right, including various join types, a join condition and a post join filter expr.
func (*JoinRel) CopyWithExpressionRewrite ¶
func (j *JoinRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, newInputs ...Rel) (Rel, error)
func (*JoinRel) Expr ¶
func (j *JoinRel) Expr() expr.Expression
func (*JoinRel) GetAdvancedExtension ¶
func (j *JoinRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*JoinRel) JoinedRecordType ¶
func (j *JoinRel) JoinedRecordType() types.RecordType
func (*JoinRel) PostJoinFilter ¶
func (j *JoinRel) PostJoinFilter() expr.Expression
func (*JoinRel) RecordType ¶
func (j *JoinRel) RecordType() types.RecordType
func (*JoinRel) ToProtoPlanRel ¶
type JoinType ¶
type JoinType = proto.JoinRel_JoinType
type LocalFileReadRel ¶
type LocalFileReadRel struct {
// contains filtered or unexported fields
}
LocalFileReadRel represents a list of files in input of a scan operation.
func (*LocalFileReadRel) BaseSchema ¶
func (b *LocalFileReadRel) BaseSchema() types.NamedStruct
func (*LocalFileReadRel) BestEffortFilter ¶
func (b *LocalFileReadRel) BestEffortFilter() expr.Expression
func (*LocalFileReadRel) CopyWithExpressionRewrite ¶
func (lf *LocalFileReadRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, _ ...Rel) (Rel, error)
func (*LocalFileReadRel) Filter ¶
func (b *LocalFileReadRel) Filter() expr.Expression
func (*LocalFileReadRel) GetAdvancedExtension ¶
func (lf *LocalFileReadRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*LocalFileReadRel) Item ¶
func (lf *LocalFileReadRel) Item(i int) FileOrFiles
func (*LocalFileReadRel) Projection ¶
func (b *LocalFileReadRel) Projection() *expr.MaskExpression
func (*LocalFileReadRel) RecordType ¶
func (b *LocalFileReadRel) RecordType() types.RecordType
func (*LocalFileReadRel) SetProjection ¶
func (b *LocalFileReadRel) SetProjection(p *expr.MaskExpression)
func (*LocalFileReadRel) ToProto ¶
func (lf *LocalFileReadRel) ToProto() *proto.Rel
func (*LocalFileReadRel) ToProtoPlanRel ¶
func (lf *LocalFileReadRel) ToProtoPlanRel() *proto.PlanRel
type MergeJoinRel ¶
type MergeJoinRel struct { RelCommon // contains filtered or unexported fields }
MergeJoinRel represents a join done by taking advantage of two sets that are sorted on the join keys. This allows the join operation to be done in a streaming fashion.
func (*MergeJoinRel) CopyWithExpressionRewrite ¶
func (mr *MergeJoinRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, newInputs ...Rel) (Rel, error)
func (*MergeJoinRel) GetAdvancedExtension ¶
func (mr *MergeJoinRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*MergeJoinRel) GetInputs ¶
func (mr *MergeJoinRel) GetInputs() []Rel
func (*MergeJoinRel) Left ¶
func (mr *MergeJoinRel) Left() Rel
func (*MergeJoinRel) LeftKeys ¶
func (mr *MergeJoinRel) LeftKeys() []*expr.FieldReference
func (*MergeJoinRel) PostJoinFilter ¶
func (mr *MergeJoinRel) PostJoinFilter() expr.Expression
func (*MergeJoinRel) RecordType ¶
func (mr *MergeJoinRel) RecordType() types.RecordType
func (*MergeJoinRel) Right ¶
func (mr *MergeJoinRel) Right() Rel
func (*MergeJoinRel) RightKeys ¶
func (mr *MergeJoinRel) RightKeys() []*expr.FieldReference
func (*MergeJoinRel) ToProto ¶
func (mr *MergeJoinRel) ToProto() *proto.Rel
func (*MergeJoinRel) ToProtoPlanRel ¶
func (mr *MergeJoinRel) ToProtoPlanRel() *proto.PlanRel
func (*MergeJoinRel) Type ¶
func (mr *MergeJoinRel) Type() HashMergeJoinType
type MultiRel ¶
MultiRel is a convenience interface representing any relation that takes an arbitrary number of inputs.
type NamedTableReadRel ¶
type NamedTableReadRel struct {
// contains filtered or unexported fields
}
NamedTableReadRel is a named scan of a base table. The list of strings that make up the names are to represent namespacing (e.g. mydb.mytable). This assumes a shared catalog between systems exchanging a message.
func (*NamedTableReadRel) BaseSchema ¶
func (b *NamedTableReadRel) BaseSchema() types.NamedStruct
func (*NamedTableReadRel) BestEffortFilter ¶
func (b *NamedTableReadRel) BestEffortFilter() expr.Expression
func (*NamedTableReadRel) CopyWithExpressionRewrite ¶
func (n *NamedTableReadRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, _ ...Rel) (Rel, error)
func (*NamedTableReadRel) Filter ¶
func (b *NamedTableReadRel) Filter() expr.Expression
func (*NamedTableReadRel) GetAdvancedExtension ¶
func (b *NamedTableReadRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*NamedTableReadRel) NamedTableAdvancedExtension ¶
func (n *NamedTableReadRel) NamedTableAdvancedExtension() *extensions.AdvancedExtension
func (*NamedTableReadRel) Names ¶
func (n *NamedTableReadRel) Names() []string
func (*NamedTableReadRel) Projection ¶
func (b *NamedTableReadRel) Projection() *expr.MaskExpression
func (*NamedTableReadRel) RecordType ¶
func (n *NamedTableReadRel) RecordType() types.RecordType
func (*NamedTableReadRel) SetProjection ¶
func (b *NamedTableReadRel) SetProjection(p *expr.MaskExpression)
func (*NamedTableReadRel) ToProto ¶
func (n *NamedTableReadRel) ToProto() *proto.Rel
func (*NamedTableReadRel) ToProtoPlanRel ¶
func (n *NamedTableReadRel) ToProtoPlanRel() *proto.PlanRel
type NamedTableWriteRel ¶
type NamedTableWriteRel struct { RelCommon // contains filtered or unexported fields }
NamedTableWriteRel is a relational operator that writes data to a table. The list of strings that make up the names are to represent namespacing (e.g. mydb.mytable). This assumes a shared catalog between systems exchanging a message. op as WriteOpCTAS is a special case of write operation where the output is written to a new table.
func (*NamedTableWriteRel) CopyWithExpressionRewrite ¶
func (wr *NamedTableWriteRel) CopyWithExpressionRewrite(_ RewriteFunc, newInputs ...Rel) (Rel, error)
func (*NamedTableWriteRel) GetInputs ¶
func (wr *NamedTableWriteRel) GetInputs() []Rel
func (*NamedTableWriteRel) Input ¶
func (wr *NamedTableWriteRel) Input() Rel
func (*NamedTableWriteRel) NamedTableAdvancedExtension ¶
func (wr *NamedTableWriteRel) NamedTableAdvancedExtension() *extensions.AdvancedExtension
func (*NamedTableWriteRel) Names ¶
func (wr *NamedTableWriteRel) Names() []string
func (*NamedTableWriteRel) Op ¶
func (wr *NamedTableWriteRel) Op() WriteOp
func (*NamedTableWriteRel) OutputMode ¶
func (wr *NamedTableWriteRel) OutputMode() OutputMode
func (*NamedTableWriteRel) RecordType ¶
func (wr *NamedTableWriteRel) RecordType() types.RecordType
func (*NamedTableWriteRel) Remap ¶
func (wr *NamedTableWriteRel) Remap(mapping ...int32) (Rel, error)
func (*NamedTableWriteRel) TableSchema ¶
func (wr *NamedTableWriteRel) TableSchema() types.NamedStruct
func (*NamedTableWriteRel) ToProto ¶
func (wr *NamedTableWriteRel) ToProto() *proto.Rel
func (*NamedTableWriteRel) ToProtoPlanRel ¶
func (wr *NamedTableWriteRel) ToProtoPlanRel() *proto.PlanRel
type OrcReadOptions ¶
type OrcReadOptions proto.ReadRel_LocalFiles_FileOrFiles_OrcReadOptions
type OutputMode ¶
type OutputMode = proto.WriteRel_OutputMode
type ParquetReadOptions ¶
type ParquetReadOptions proto.ReadRel_LocalFiles_FileOrFiles_ParquetReadOptions
type PathType ¶
type PathType int8
PathType is the type of a LocalFileReadRel's uris.
const ( // A uri that can refer to either a single folder or a single file URIPath PathType = iota // A URI where the path portion is a glob expression that can // identify zero or more paths. Consumers should support // POSIX syntax. The recursive globstar (**) may not be supported. URIPathGlob // A URI that refers to a single file. URIFile // A URI that refers to a single folder. URIFolder )
type Plan ¶
type Plan struct {
// contains filtered or unexported fields
}
Plan describes a set of operations to complete. For compactness, identifiers are normalized at the plan level.
func FromProto ¶
func FromProto(plan *proto.Plan, c *extensions.Collection) (*Plan, error)
func (*Plan) AdvancedExtension ¶
func (p *Plan) AdvancedExtension() AdvancedExtension
AdvancedExtension returns optional additional extensions associated with this plan such as optimizations or enhancements.
func (*Plan) ExpectedTypeURLs ¶
ExpectedTypeURLs is a list of anypb.Any protobuf entities that this plan may use. This can be used to warn if some embedded message types are unknown. Note that this list may include message types which are ignorable (optimizations) or are unused. In many cases, a consumer may be able to work with a plan even if one or more message types defined here are unknown.
This returns a clone of the slice, so that the Plan itself remains immutable.
func (*Plan) ExtensionRegistry ¶
func (p *Plan) ExtensionRegistry() expr.ExtensionRegistry
ExtensionRegistry returns the set of registered extensions for this plan that it may depend on.
func (*Plan) GetNonRootRelations ¶
GetNonRootRelations returns a slice containing only the relations from this plan which are not considered Roots.
func (*Plan) GetRoots ¶
GetRoots returns a slice containing *only* the relations which are considered Root relations from the list (as opposed to CTEs or references).
type ProjectRel ¶
type ProjectRel struct { RelCommon // contains filtered or unexported fields }
ProjectRel represents calculated expressions of fields (e.g. a+b), the OutputMapping will be used to represent classical relational projections.
func (*ProjectRel) CopyWithExpressionRewrite ¶
func (p *ProjectRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, newInputs ...Rel) (Rel, error)
func (*ProjectRel) Expressions ¶
func (p *ProjectRel) Expressions() []expr.Expression
func (*ProjectRel) GetAdvancedExtension ¶
func (p *ProjectRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*ProjectRel) GetInputs ¶
func (p *ProjectRel) GetInputs() []Rel
func (*ProjectRel) Input ¶
func (p *ProjectRel) Input() Rel
func (*ProjectRel) RecordType ¶
func (p *ProjectRel) RecordType() types.RecordType
func (*ProjectRel) ToProto ¶
func (p *ProjectRel) ToProto() *proto.Rel
func (*ProjectRel) ToProtoPlanRel ¶
func (p *ProjectRel) ToProtoPlanRel() *proto.PlanRel
type ReadRel ¶
type ReadRel interface { Rel BaseSchema() types.NamedStruct Filter() expr.Expression BestEffortFilter() expr.Expression Projection() *expr.MaskExpression // contains filtered or unexported methods }
ReadRel is a scan operator of base data (physical or virtual) and allows filtering and projection of that underlying data.
type Rel ¶
type Rel interface { // Hint returns a set of changes to the operation which can influence // efficiency and performance but should not impact correctness. // // This includes things such as Stats and Runtime constraints. Hint() *Hint // OutputMapping is optional and may be nil. If this is nil, then // the result of this relation is the direct output as is (with no // reordering or projection of columns). Otherwise this is a slice // of indices into the underlying relation's output to map columns // to the intended result column order. // // For example, an output map of [5, 2, 1] means that the expected // result should be 3 columns consisting of the 5th, 2nd and 1st // output columns from the underlying relation. OutputMapping() []int32 // Remap modifies the current relation by applying the provided // mapping to the current relation. Typically used to remove any // unneeded columns or provide them in a different order. If there // already is a mapping on this relation, this provides mapping over // the current mapping. // // If any column numbers specified are outside the currently available // input range an error is returned and the mapping is left unchanged. Remap(mapping ...int32) (Rel, error) // RecordType returns the types used by all columns returned by // this relation after applying any provided mapping. RecordType() types.RecordType GetAdvancedExtension() *extensions.AdvancedExtension ToProto() *proto.Rel ToProtoPlanRel() *proto.PlanRel // Copy creates a copy of this relation with new inputs Copy(newInputs ...Rel) (Rel, error) // GetInputs returns a list of zero or more inputs for this relation GetInputs() []Rel // CopyWithExpressionRewrite rewrites all expression trees in this Rel. Returns original Rel // if no changes were made, otherwise a newly created rel that includes the given expressions CopyWithExpressionRewrite(rewriteFunc RewriteFunc, newInputs ...Rel) (Rel, error) // contains filtered or unexported methods }
Rel is a relation tree, representing one of the expected Relation types such as Fetch, Sort, Filter, Join, etc.
It contains the common functionality between the different relations and should be type switched to determine which relation type it actually is for evaluation.
All the exported methods in this interface should be considered constant.
func RelFromProto ¶
type RelCommon ¶
type RelCommon struct {
// contains filtered or unexported fields
}
RelCommon is the common fields of all relational operators and is embedded in all of them.
func (*RelCommon) GetAdvancedExtension ¶
func (rc *RelCommon) GetAdvancedExtension() *extensions.AdvancedExtension
func (*RelCommon) OutputMapping ¶
type Relation ¶
type Relation struct {
// contains filtered or unexported fields
}
Relation is either a Root relation (a relation + list of column names) or another relation (such as a CTE or other reference).
type RewriteFunc ¶
type RewriteFunc func(expr.Expression) (expr.Expression, error)
type Root ¶
type Root struct {
// contains filtered or unexported fields
}
Root is a relation with output field names. This is used as the root of a Rel tree.
func (*Root) RecordType ¶
func (r *Root) RecordType() types.NamedStruct
func (*Root) ToProtoPlanRel ¶
type RuntimeConstraint ¶
type RuntimeConstraint = proto.RelCommon_Hint_RuntimeConstraint
type SetOp ¶
type SetOp = proto.SetRel_SetOp
type SetRel ¶
type SetRel struct { RelCommon // contains filtered or unexported fields }
SetRel represents the relational set operators (intersection, union, etc.)
func (*SetRel) CopyWithExpressionRewrite ¶
func (s *SetRel) CopyWithExpressionRewrite(_ RewriteFunc, newInputs ...Rel) (Rel, error)
func (*SetRel) GetAdvancedExtension ¶
func (s *SetRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*SetRel) RecordType ¶
func (s *SetRel) RecordType() types.RecordType
func (*SetRel) ToProtoPlanRel ¶
type SingleInputRel ¶
SingleInputRel is a convenience interface representing any relation that consists of exactly one input relation, such as a filter.
type SortRel ¶
type SortRel struct { RelCommon // contains filtered or unexported fields }
SortRel is an ORDER BY relational operator, describing a base relation, it includes a list of fields to sort on.
func (*SortRel) CopyWithExpressionRewrite ¶
func (sr *SortRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, newInputs ...Rel) (Rel, error)
func (*SortRel) GetAdvancedExtension ¶
func (sr *SortRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*SortRel) RecordType ¶
func (sr *SortRel) RecordType() types.RecordType
func (*SortRel) ToProtoPlanRel ¶
type Stats ¶
type Stats = proto.RelCommon_Hint_Stats
type VirtualTableReadRel ¶
type VirtualTableReadRel struct {
// contains filtered or unexported fields
}
VirtualTableReadRel represents a table composed of literals.
func (*VirtualTableReadRel) BaseSchema ¶
func (b *VirtualTableReadRel) BaseSchema() types.NamedStruct
func (*VirtualTableReadRel) BestEffortFilter ¶
func (b *VirtualTableReadRel) BestEffortFilter() expr.Expression
func (*VirtualTableReadRel) CopyWithExpressionRewrite ¶
func (v *VirtualTableReadRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, _ ...Rel) (Rel, error)
func (*VirtualTableReadRel) Filter ¶
func (b *VirtualTableReadRel) Filter() expr.Expression
func (*VirtualTableReadRel) GetAdvancedExtension ¶
func (b *VirtualTableReadRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*VirtualTableReadRel) Projection ¶
func (b *VirtualTableReadRel) Projection() *expr.MaskExpression
func (*VirtualTableReadRel) RecordType ¶
func (b *VirtualTableReadRel) RecordType() types.RecordType
func (*VirtualTableReadRel) Remap ¶
func (v *VirtualTableReadRel) Remap(mapping ...int32) (Rel, error)
func (*VirtualTableReadRel) SetProjection ¶
func (b *VirtualTableReadRel) SetProjection(p *expr.MaskExpression)
func (*VirtualTableReadRel) ToProto ¶
func (v *VirtualTableReadRel) ToProto() *proto.Rel
func (*VirtualTableReadRel) ToProtoPlanRel ¶
func (v *VirtualTableReadRel) ToProtoPlanRel() *proto.PlanRel
func (*VirtualTableReadRel) Values ¶
func (v *VirtualTableReadRel) Values() []expr.VirtualTableExpressionValue
type WriteOp ¶
type WriteOp = proto.WriteRel_WriteOp