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.StructType
- 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.StructType
- 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.StructType
- 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.StructType
- 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.StructType
- 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.StructType
- 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.StructType
- 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.StructType
- 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.StructType
- 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.StructType
- func (j *JoinRel) Left() Rel
- func (j *JoinRel) PostJoinFilter() expr.Expression
- func (j *JoinRel) RecordType() types.StructType
- 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.StructType
- 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.StructType
- 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 (b *NamedTableReadRel) RecordType() types.StructType
- 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 (n *NamedTableWriteRel) NamedTableAdvancedExtension() *extensions.AdvancedExtension
- func (n *NamedTableWriteRel) Names() []string
- func (wr *NamedTableWriteRel) Op() WriteOp
- func (wr *NamedTableWriteRel) OutputMode() OutputMode
- func (wr *NamedTableWriteRel) RecordType() types.StructType
- 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.StructType
- 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.StructType
- 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.StructType
- 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.StructType
- func (b *VirtualTableReadRel) SetProjection(p *expr.MaskExpression)
- func (v *VirtualTableReadRel) ToProto() *proto.Rel
- func (v *VirtualTableReadRel) ToProtoPlanRel() *proto.PlanRel
- func (v *VirtualTableReadRel) Values() []expr.StructLiteralValue
- 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 )
Variables ¶
var CurrentVersion = types.Version{
MajorNumber: 0,
MinorNumber: 29,
PatchNumber: 0,
Producer: "substrait-go",
}
Functions ¶
This section is empty.
Types ¶
type AdvancedExtension ¶ added in v0.4.0
type AggRelMeasure ¶ added in v0.4.0
type AggRelMeasure struct {
// contains filtered or unexported fields
}
func (*AggRelMeasure) Filter ¶ added in v0.4.0
func (am *AggRelMeasure) Filter() expr.Expression
func (*AggRelMeasure) Measure ¶ added in v0.4.0
func (am *AggRelMeasure) Measure() *expr.AggregateFunction
func (*AggRelMeasure) ToProto ¶ added in v0.4.0
func (am *AggRelMeasure) ToProto() *proto.AggregateRel_Measure
type AggregateRel ¶ added in v0.4.0
type AggregateRel struct { RelCommon // contains filtered or unexported fields }
AggregateRel is a relational operator representing a GROUP BY aggregate.
func (*AggregateRel) Copy ¶ added in v0.5.0
func (ar *AggregateRel) Copy(newInputs ...Rel) (Rel, error)
func (*AggregateRel) CopyWithExpressionRewrite ¶ added in v0.5.0
func (ar *AggregateRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, newInputs ...Rel) (Rel, error)
func (*AggregateRel) GetAdvancedExtension ¶ added in v0.4.0
func (ar *AggregateRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*AggregateRel) GetInputs ¶ added in v0.5.0
func (ar *AggregateRel) GetInputs() []Rel
func (*AggregateRel) Groupings ¶ added in v0.4.0
func (ar *AggregateRel) Groupings() [][]expr.Expression
Groupings is a list of expression groupings that the aggregation measures should be calculated for.
func (*AggregateRel) Input ¶ added in v0.4.0
func (ar *AggregateRel) Input() Rel
func (*AggregateRel) Measures ¶ added in v0.4.0
func (ar *AggregateRel) Measures() []AggRelMeasure
func (*AggregateRel) RecordType ¶ added in v0.4.0
func (ar *AggregateRel) RecordType() types.StructType
func (*AggregateRel) ToProto ¶ added in v0.4.0
func (ar *AggregateRel) ToProto() *proto.Rel
func (*AggregateRel) ToProtoPlanRel ¶ added in v0.4.0
func (ar *AggregateRel) ToProtoPlanRel() *proto.PlanRel
type ArrowReadOptions ¶ added in v0.4.0
type ArrowReadOptions proto.ReadRel_LocalFiles_FileOrFiles_ArrowReadOptions
type BiRel ¶ added in v0.4.0
BiRel is a convenience interface representing any relation that takes exactly two input relations such as joins.
type Builder ¶ added in v0.4.0
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) ProjectRemap(input Rel, remap []int32, exprs ...expr.Expression) (*ProjectRel, error) AggregateColumnsRemap(input Rel, remap []int32, measures []AggRelMeasure, groupByCols ...int32) (*AggregateRel, error) AggregateColumns(input Rel, measures []AggRelMeasure, groupByCols ...int32) (*AggregateRel, error) AggregateExprsRemap(input Rel, remap []int32, measures []AggRelMeasure, groups ...[]expr.Expression) (*AggregateRel, error) AggregateExprs(input Rel, measures []AggRelMeasure, groups ...[]expr.Expression) (*AggregateRel, error) CreateTableAsSelectRemap(input Rel, remap []int32, tableName []string, schema types.NamedStruct) (*NamedTableWriteRel, error) CreateTableAsSelect(input Rel, tableName []string, schema types.NamedStruct) (*NamedTableWriteRel, error) CrossRemap(left, right Rel, remap []int32) (*CrossRel, error) Cross(left, right Rel) (*CrossRel, error) FetchRemap(input Rel, offset, count uint64, remap []int32) (*FetchRel, error) Fetch(input Rel, offset, count uint64) (*FetchRel, error) FilterRemap(input Rel, condition expr.Expression, remap []int32) (*FilterRel, error) Filter(input Rel, condition expr.Expression) (*FilterRel, error) JoinAndFilterRemap(left, right Rel, condition, postJoinFilter expr.Expression, joinType JoinType, remap []int32) (*JoinRel, error) JoinAndFilter(left, right Rel, condition, postJoinFilter expr.Expression, joinType JoinType) (*JoinRel, error) JoinRemap(left, right Rel, condition expr.Expression, joinType JoinType, remap []int32) (*JoinRel, error) Join(left, right Rel, condition expr.Expression, joinType JoinType) (*JoinRel, error) NamedScanRemap(tableName []string, schema types.NamedStruct, remap []int32) (*NamedTableReadRel, error) NamedScan(tableName []string, schema types.NamedStruct) *NamedTableReadRel VirtualTableRemap(fields []string, remap []int32, values ...expr.StructLiteralValue) (*VirtualTableReadRel, error) VirtualTable(fields []string, values ...expr.StructLiteralValue) (*VirtualTableReadRel, error) SortRemap(input Rel, remap []int32, sorts ...expr.SortField) (*SortRel, error) Sort(input Rel, sorts ...expr.SortField) (*SortRel, error) 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) }
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 ¶ added in v0.4.0
func NewBuilder(c *extensions.Collection) Builder
func NewBuilderDefault ¶ added in v0.4.0
func NewBuilderDefault() Builder
type CrossRel ¶ added in v0.4.0
type CrossRel struct { RelCommon // contains filtered or unexported fields }
CrossRel is a cartesian product relational operator of two tables.
func (*CrossRel) CopyWithExpressionRewrite ¶ added in v0.5.0
func (c *CrossRel) CopyWithExpressionRewrite(_ RewriteFunc, newInputs ...Rel) (Rel, error)
func (*CrossRel) GetAdvancedExtension ¶ added in v0.4.0
func (c *CrossRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*CrossRel) RecordType ¶ added in v0.4.0
func (c *CrossRel) RecordType() types.StructType
func (*CrossRel) ToProtoPlanRel ¶ added in v0.4.0
type DwrfReadOptions ¶ added in v0.4.0
type DwrfReadOptions proto.ReadRel_LocalFiles_FileOrFiles_DwrfReadOptions
type ExtensionLeafRel ¶ added in v0.4.0
type ExtensionLeafRel struct { RelCommon // contains filtered or unexported fields }
ExtensionLeafRel is a stub to support extensions with zero inputs.
func (*ExtensionLeafRel) Copy ¶ added in v0.5.0
func (el *ExtensionLeafRel) Copy(_ ...Rel) (Rel, error)
func (*ExtensionLeafRel) CopyWithExpressionRewrite ¶ added in v0.5.0
func (el *ExtensionLeafRel) CopyWithExpressionRewrite(_ RewriteFunc, _ ...Rel) (Rel, error)
func (*ExtensionLeafRel) Detail ¶ added in v0.4.0
func (el *ExtensionLeafRel) Detail() *anypb.Any
func (*ExtensionLeafRel) GetInputs ¶ added in v0.5.0
func (el *ExtensionLeafRel) GetInputs() []Rel
func (*ExtensionLeafRel) RecordType ¶ added in v0.4.0
func (el *ExtensionLeafRel) RecordType() types.StructType
func (*ExtensionLeafRel) ToProto ¶ added in v0.4.0
func (el *ExtensionLeafRel) ToProto() *proto.Rel
func (*ExtensionLeafRel) ToProtoPlanRel ¶ added in v0.4.0
func (el *ExtensionLeafRel) ToProtoPlanRel() *proto.PlanRel
type ExtensionMultiRel ¶ added in v0.4.0
type ExtensionMultiRel struct { RelCommon // contains filtered or unexported fields }
ExtensionMultiRel is a stub to support extensions with multiple inputs.
func (*ExtensionMultiRel) Copy ¶ added in v0.5.0
func (em *ExtensionMultiRel) Copy(newInputs ...Rel) (Rel, error)
func (*ExtensionMultiRel) CopyWithExpressionRewrite ¶ added in v0.5.0
func (em *ExtensionMultiRel) CopyWithExpressionRewrite(_ RewriteFunc, newInputs ...Rel) (Rel, error)
func (*ExtensionMultiRel) Detail ¶ added in v0.4.0
func (em *ExtensionMultiRel) Detail() *anypb.Any
func (*ExtensionMultiRel) GetInputs ¶ added in v0.5.0
func (em *ExtensionMultiRel) GetInputs() []Rel
func (*ExtensionMultiRel) Inputs ¶ added in v0.4.0
func (em *ExtensionMultiRel) Inputs() []Rel
func (*ExtensionMultiRel) RecordType ¶ added in v0.4.0
func (em *ExtensionMultiRel) RecordType() types.StructType
func (*ExtensionMultiRel) ToProto ¶ added in v0.4.0
func (em *ExtensionMultiRel) ToProto() *proto.Rel
func (*ExtensionMultiRel) ToProtoPlanRel ¶ added in v0.4.0
func (em *ExtensionMultiRel) ToProtoPlanRel() *proto.PlanRel
type ExtensionReadOptions ¶ added in v0.4.0
type ExtensionSingleRel ¶ added in v0.4.0
type ExtensionSingleRel struct { RelCommon // contains filtered or unexported fields }
ExtensionSingleRel is a stub to support extensions with a single input.
func (*ExtensionSingleRel) Copy ¶ added in v0.5.0
func (es *ExtensionSingleRel) Copy(newInputs ...Rel) (Rel, error)
func (*ExtensionSingleRel) CopyWithExpressionRewrite ¶ added in v0.5.0
func (es *ExtensionSingleRel) CopyWithExpressionRewrite(_ RewriteFunc, newInputs ...Rel) (Rel, error)
func (*ExtensionSingleRel) Detail ¶ added in v0.4.0
func (es *ExtensionSingleRel) Detail() *anypb.Any
func (*ExtensionSingleRel) GetInputs ¶ added in v0.5.0
func (es *ExtensionSingleRel) GetInputs() []Rel
func (*ExtensionSingleRel) Input ¶ added in v0.4.0
func (es *ExtensionSingleRel) Input() Rel
func (*ExtensionSingleRel) RecordType ¶ added in v0.4.0
func (es *ExtensionSingleRel) RecordType() types.StructType
func (*ExtensionSingleRel) ToProto ¶ added in v0.4.0
func (es *ExtensionSingleRel) ToProto() *proto.Rel
func (*ExtensionSingleRel) ToProtoPlanRel ¶ added in v0.4.0
func (es *ExtensionSingleRel) ToProtoPlanRel() *proto.PlanRel
type ExtensionTableReadRel ¶ added in v0.4.0
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 ¶ added in v0.4.0
func (b *ExtensionTableReadRel) BaseSchema() types.NamedStruct
func (*ExtensionTableReadRel) BestEffortFilter ¶ added in v0.4.0
func (b *ExtensionTableReadRel) BestEffortFilter() expr.Expression
func (*ExtensionTableReadRel) Copy ¶ added in v0.5.0
func (e *ExtensionTableReadRel) Copy(_ ...Rel) (Rel, error)
func (*ExtensionTableReadRel) CopyWithExpressionRewrite ¶ added in v0.5.0
func (e *ExtensionTableReadRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, _ ...Rel) (Rel, error)
func (*ExtensionTableReadRel) Detail ¶ added in v0.4.0
func (e *ExtensionTableReadRel) Detail() *anypb.Any
func (*ExtensionTableReadRel) Filter ¶ added in v0.4.0
func (b *ExtensionTableReadRel) Filter() expr.Expression
func (*ExtensionTableReadRel) GetAdvancedExtension ¶ added in v0.4.0
func (b *ExtensionTableReadRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*ExtensionTableReadRel) GetInputs ¶ added in v0.5.0
func (b *ExtensionTableReadRel) GetInputs() []Rel
func (*ExtensionTableReadRel) Projection ¶ added in v0.4.0
func (b *ExtensionTableReadRel) Projection() *expr.MaskExpression
func (*ExtensionTableReadRel) RecordType ¶ added in v0.4.0
func (b *ExtensionTableReadRel) RecordType() types.StructType
func (*ExtensionTableReadRel) SetProjection ¶ added in v1.2.0
func (b *ExtensionTableReadRel) SetProjection(p *expr.MaskExpression)
func (*ExtensionTableReadRel) ToProto ¶ added in v0.4.0
func (e *ExtensionTableReadRel) ToProto() *proto.Rel
func (*ExtensionTableReadRel) ToProtoPlanRel ¶ added in v0.4.0
func (e *ExtensionTableReadRel) ToProtoPlanRel() *proto.PlanRel
type FetchRel ¶ added in v0.4.0
type FetchRel struct { RelCommon // contains filtered or unexported fields }
FetchRel is a relational operator representing LIMIT/OFFSET or TOP type semantics.
func (*FetchRel) CopyWithExpressionRewrite ¶ added in v0.5.0
func (f *FetchRel) CopyWithExpressionRewrite(_ RewriteFunc, newInputs ...Rel) (Rel, error)
func (*FetchRel) GetAdvancedExtension ¶ added in v0.4.0
func (f *FetchRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*FetchRel) RecordType ¶ added in v0.4.0
func (f *FetchRel) RecordType() types.StructType
func (*FetchRel) ToProtoPlanRel ¶ added in v0.4.0
type FileFormat ¶ added in v0.4.0
type FileFormat interface {
// contains filtered or unexported methods
}
type FileOrFiles ¶ added in v0.4.0
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 ¶ added in v0.4.0
func (f *FileOrFiles) ToProto() *proto.ReadRel_LocalFiles_FileOrFiles
type FilterRel ¶ added in v0.4.0
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 ¶ added in v0.4.0
func (fr *FilterRel) Condition() expr.Expression
func (*FilterRel) CopyWithExpressionRewrite ¶ added in v0.5.0
func (fr *FilterRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, newInputs ...Rel) (Rel, error)
func (*FilterRel) GetAdvancedExtension ¶ added in v0.4.0
func (fr *FilterRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*FilterRel) RecordType ¶ added in v0.4.0
func (fr *FilterRel) RecordType() types.StructType
func (*FilterRel) ToProtoPlanRel ¶ added in v0.4.0
type HashJoinRel ¶ added in v0.4.0
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) Copy ¶ added in v0.5.0
func (hr *HashJoinRel) Copy(newInputs ...Rel) (Rel, error)
func (*HashJoinRel) CopyWithExpressionRewrite ¶ added in v0.5.0
func (hr *HashJoinRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, newInputs ...Rel) (Rel, error)
func (*HashJoinRel) GetAdvancedExtension ¶ added in v0.4.0
func (hr *HashJoinRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*HashJoinRel) GetInputs ¶ added in v0.5.0
func (hr *HashJoinRel) GetInputs() []Rel
func (*HashJoinRel) Left ¶ added in v0.4.0
func (hr *HashJoinRel) Left() Rel
func (*HashJoinRel) LeftKeys ¶ added in v0.4.0
func (hr *HashJoinRel) LeftKeys() []*expr.FieldReference
func (*HashJoinRel) PostJoinFilter ¶ added in v0.4.0
func (hr *HashJoinRel) PostJoinFilter() expr.Expression
func (*HashJoinRel) RecordType ¶ added in v0.4.0
func (hr *HashJoinRel) RecordType() types.StructType
func (*HashJoinRel) Right ¶ added in v0.4.0
func (hr *HashJoinRel) Right() Rel
func (*HashJoinRel) RightKeys ¶ added in v0.4.0
func (hr *HashJoinRel) RightKeys() []*expr.FieldReference
func (*HashJoinRel) ToProto ¶ added in v0.4.0
func (hr *HashJoinRel) ToProto() *proto.Rel
func (*HashJoinRel) ToProtoPlanRel ¶ added in v0.4.0
func (hr *HashJoinRel) ToProtoPlanRel() *proto.PlanRel
func (*HashJoinRel) Type ¶ added in v0.4.0
func (hr *HashJoinRel) Type() HashMergeJoinType
type HashMergeJoinType ¶ added in v0.4.0
type HashMergeJoinType int8
const ( HashMergeUnspecified HashMergeJoinType = iota HashMergeInner HashMergeOuter HashMergeLeft HashMergeRight HashMergeLeftSemi HashMergeRightSemi HashMergeLeftAnti HashMergeRightAnti )
type Hint ¶ added in v0.4.0
type Hint = proto.RelCommon_Hint
type JoinRel ¶ added in v0.4.0
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 ¶ added in v0.5.0
func (j *JoinRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, newInputs ...Rel) (Rel, error)
func (*JoinRel) Expr ¶ added in v0.4.0
func (j *JoinRel) Expr() expr.Expression
func (*JoinRel) GetAdvancedExtension ¶ added in v0.4.0
func (j *JoinRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*JoinRel) JoinedRecordType ¶ added in v0.4.0
func (j *JoinRel) JoinedRecordType() types.StructType
func (*JoinRel) PostJoinFilter ¶ added in v0.4.0
func (j *JoinRel) PostJoinFilter() expr.Expression
func (*JoinRel) RecordType ¶ added in v0.4.0
func (j *JoinRel) RecordType() types.StructType
func (*JoinRel) ToProtoPlanRel ¶ added in v0.4.0
type JoinType ¶ added in v0.4.0
type JoinType = proto.JoinRel_JoinType
type LocalFileReadRel ¶ added in v0.4.0
type LocalFileReadRel struct {
// contains filtered or unexported fields
}
LocalFileReadRel represents a list of files in input of a scan operation.
func (*LocalFileReadRel) BaseSchema ¶ added in v0.4.0
func (b *LocalFileReadRel) BaseSchema() types.NamedStruct
func (*LocalFileReadRel) BestEffortFilter ¶ added in v0.4.0
func (b *LocalFileReadRel) BestEffortFilter() expr.Expression
func (*LocalFileReadRel) Copy ¶ added in v0.5.0
func (lf *LocalFileReadRel) Copy(_ ...Rel) (Rel, error)
func (*LocalFileReadRel) CopyWithExpressionRewrite ¶ added in v0.5.0
func (lf *LocalFileReadRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, _ ...Rel) (Rel, error)
func (*LocalFileReadRel) Filter ¶ added in v0.4.0
func (b *LocalFileReadRel) Filter() expr.Expression
func (*LocalFileReadRel) GetAdvancedExtension ¶ added in v0.4.0
func (lf *LocalFileReadRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*LocalFileReadRel) Item ¶ added in v0.4.0
func (lf *LocalFileReadRel) Item(i int) FileOrFiles
func (*LocalFileReadRel) Projection ¶ added in v0.4.0
func (b *LocalFileReadRel) Projection() *expr.MaskExpression
func (*LocalFileReadRel) RecordType ¶ added in v0.4.0
func (b *LocalFileReadRel) RecordType() types.StructType
func (*LocalFileReadRel) SetProjection ¶ added in v1.2.0
func (b *LocalFileReadRel) SetProjection(p *expr.MaskExpression)
func (*LocalFileReadRel) ToProto ¶ added in v0.4.0
func (lf *LocalFileReadRel) ToProto() *proto.Rel
func (*LocalFileReadRel) ToProtoPlanRel ¶ added in v0.4.0
func (lf *LocalFileReadRel) ToProtoPlanRel() *proto.PlanRel
type MergeJoinRel ¶ added in v0.4.0
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) Copy ¶ added in v0.5.0
func (mr *MergeJoinRel) Copy(newInputs ...Rel) (Rel, error)
func (*MergeJoinRel) CopyWithExpressionRewrite ¶ added in v0.5.0
func (mr *MergeJoinRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, newInputs ...Rel) (Rel, error)
func (*MergeJoinRel) GetAdvancedExtension ¶ added in v0.4.0
func (mr *MergeJoinRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*MergeJoinRel) GetInputs ¶ added in v0.5.0
func (mr *MergeJoinRel) GetInputs() []Rel
func (*MergeJoinRel) Left ¶ added in v0.4.0
func (mr *MergeJoinRel) Left() Rel
func (*MergeJoinRel) LeftKeys ¶ added in v0.4.0
func (mr *MergeJoinRel) LeftKeys() []*expr.FieldReference
func (*MergeJoinRel) PostJoinFilter ¶ added in v0.4.0
func (mr *MergeJoinRel) PostJoinFilter() expr.Expression
func (*MergeJoinRel) RecordType ¶ added in v0.4.0
func (mr *MergeJoinRel) RecordType() types.StructType
func (*MergeJoinRel) Right ¶ added in v0.4.0
func (mr *MergeJoinRel) Right() Rel
func (*MergeJoinRel) RightKeys ¶ added in v0.4.0
func (mr *MergeJoinRel) RightKeys() []*expr.FieldReference
func (*MergeJoinRel) ToProto ¶ added in v0.4.0
func (mr *MergeJoinRel) ToProto() *proto.Rel
func (*MergeJoinRel) ToProtoPlanRel ¶ added in v0.4.0
func (mr *MergeJoinRel) ToProtoPlanRel() *proto.PlanRel
func (*MergeJoinRel) Type ¶ added in v0.4.0
func (mr *MergeJoinRel) Type() HashMergeJoinType
type MultiRel ¶ added in v0.4.0
MultiRel is a convenience interface representing any relation that takes an arbitrary number of inputs.
type NamedTableReadRel ¶ added in v0.4.0
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 ¶ added in v0.4.0
func (b *NamedTableReadRel) BaseSchema() types.NamedStruct
func (*NamedTableReadRel) BestEffortFilter ¶ added in v0.4.0
func (b *NamedTableReadRel) BestEffortFilter() expr.Expression
func (*NamedTableReadRel) Copy ¶ added in v0.5.0
func (n *NamedTableReadRel) Copy(_ ...Rel) (Rel, error)
func (*NamedTableReadRel) CopyWithExpressionRewrite ¶ added in v0.5.0
func (n *NamedTableReadRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, _ ...Rel) (Rel, error)
func (*NamedTableReadRel) Filter ¶ added in v0.4.0
func (b *NamedTableReadRel) Filter() expr.Expression
func (*NamedTableReadRel) GetAdvancedExtension ¶ added in v0.4.0
func (b *NamedTableReadRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*NamedTableReadRel) NamedTableAdvancedExtension ¶ added in v0.4.0
func (n *NamedTableReadRel) NamedTableAdvancedExtension() *extensions.AdvancedExtension
func (*NamedTableReadRel) Names ¶ added in v0.4.0
func (n *NamedTableReadRel) Names() []string
func (*NamedTableReadRel) Projection ¶ added in v0.4.0
func (b *NamedTableReadRel) Projection() *expr.MaskExpression
func (*NamedTableReadRel) RecordType ¶ added in v0.4.0
func (b *NamedTableReadRel) RecordType() types.StructType
func (*NamedTableReadRel) SetProjection ¶ added in v1.2.0
func (b *NamedTableReadRel) SetProjection(p *expr.MaskExpression)
func (*NamedTableReadRel) ToProto ¶ added in v0.4.0
func (n *NamedTableReadRel) ToProto() *proto.Rel
func (*NamedTableReadRel) ToProtoPlanRel ¶ added in v0.4.0
func (n *NamedTableReadRel) ToProtoPlanRel() *proto.PlanRel
type NamedTableWriteRel ¶ added in v1.2.0
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) Copy ¶ added in v1.2.0
func (wr *NamedTableWriteRel) Copy(newInputs ...Rel) (Rel, error)
func (*NamedTableWriteRel) CopyWithExpressionRewrite ¶ added in v1.2.0
func (wr *NamedTableWriteRel) CopyWithExpressionRewrite(_ RewriteFunc, newInputs ...Rel) (Rel, error)
func (*NamedTableWriteRel) GetInputs ¶ added in v1.2.0
func (wr *NamedTableWriteRel) GetInputs() []Rel
func (*NamedTableWriteRel) Input ¶ added in v1.2.0
func (wr *NamedTableWriteRel) Input() Rel
func (*NamedTableWriteRel) NamedTableAdvancedExtension ¶ added in v1.2.0
func (n *NamedTableWriteRel) NamedTableAdvancedExtension() *extensions.AdvancedExtension
func (*NamedTableWriteRel) Names ¶ added in v1.2.0
func (n *NamedTableWriteRel) Names() []string
func (*NamedTableWriteRel) Op ¶ added in v1.2.0
func (wr *NamedTableWriteRel) Op() WriteOp
func (*NamedTableWriteRel) OutputMode ¶ added in v1.2.0
func (wr *NamedTableWriteRel) OutputMode() OutputMode
func (*NamedTableWriteRel) RecordType ¶ added in v1.2.0
func (wr *NamedTableWriteRel) RecordType() types.StructType
func (*NamedTableWriteRel) TableSchema ¶ added in v1.2.0
func (wr *NamedTableWriteRel) TableSchema() types.NamedStruct
func (*NamedTableWriteRel) ToProto ¶ added in v1.2.0
func (wr *NamedTableWriteRel) ToProto() *proto.Rel
func (*NamedTableWriteRel) ToProtoPlanRel ¶ added in v1.2.0
func (wr *NamedTableWriteRel) ToProtoPlanRel() *proto.PlanRel
type OrcReadOptions ¶ added in v0.4.0
type OrcReadOptions proto.ReadRel_LocalFiles_FileOrFiles_OrcReadOptions
type OutputMode ¶ added in v1.2.0
type OutputMode = proto.WriteRel_OutputMode
type ParquetReadOptions ¶ added in v0.4.0
type ParquetReadOptions proto.ReadRel_LocalFiles_FileOrFiles_ParquetReadOptions
type PathType ¶ added in v0.4.0
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 ¶ added in v0.4.0
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 ¶ added in v0.4.0
func (p *Plan) ExtensionRegistry() expr.ExtensionRegistry
ExtensionRegistry returns the set of registered extensions for this plan that it may depend on.
func (*Plan) GetNonRootRelations ¶ added in v0.4.0
GetNonRootRelations returns a slice containing only the relations from this plan which are not considered Roots.
func (*Plan) GetRoots ¶ added in v0.4.0
GetRoots returns a slice containing *only* the relations which are considered Root relations from the list (as opposed to CTEs or references).
type ProjectRel ¶ added in v0.4.0
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 ¶ added in v0.5.0
func (p *ProjectRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, newInputs ...Rel) (Rel, error)
func (*ProjectRel) Expressions ¶ added in v0.4.0
func (p *ProjectRel) Expressions() []expr.Expression
func (*ProjectRel) GetAdvancedExtension ¶ added in v0.4.0
func (p *ProjectRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*ProjectRel) GetInputs ¶ added in v0.5.0
func (p *ProjectRel) GetInputs() []Rel
func (*ProjectRel) Input ¶ added in v0.4.0
func (p *ProjectRel) Input() Rel
func (*ProjectRel) RecordType ¶ added in v0.4.0
func (p *ProjectRel) RecordType() types.StructType
func (*ProjectRel) ToProto ¶ added in v0.4.0
func (p *ProjectRel) ToProto() *proto.Rel
func (*ProjectRel) ToProtoPlanRel ¶ added in v0.4.0
func (p *ProjectRel) ToProtoPlanRel() *proto.PlanRel
type ReadRel ¶ added in v0.4.0
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 ¶ added in v0.4.0
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 utilizes the OutputMapping to construct the expected result // record type from the output RecordType of the underlying Relation. // If the output mapping is nil, then this just returns the input // type. Remap(types.StructType) types.StructType // RecordType returns the output record type of the underlying relation // as a struct type. RecordType() types.StructType 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) }
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.
func RelFromProto ¶ added in v0.4.0
type RelCommon ¶ added in v0.4.0
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 ¶ added in v0.4.0
func (rc *RelCommon) GetAdvancedExtension() *extensions.AdvancedExtension
func (*RelCommon) OutputMapping ¶ added in v0.4.0
func (*RelCommon) Remap ¶ added in v0.4.0
func (rc *RelCommon) Remap(initial types.StructType) types.StructType
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 ¶ added in v0.5.0
type RewriteFunc func(expr.Expression) (expr.Expression, error)
type Root ¶ added in v0.4.0
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 ¶ added in v0.4.0
func (r *Root) RecordType() types.NamedStruct
func (*Root) ToProtoPlanRel ¶ added in v0.4.0
type RuntimeConstraint ¶ added in v0.4.0
type RuntimeConstraint = proto.RelCommon_Hint_RuntimeConstraint
type SetOp ¶ added in v0.4.0
type SetOp = proto.SetRel_SetOp
type SetRel ¶ added in v0.4.0
type SetRel struct { RelCommon // contains filtered or unexported fields }
SetRel represents the relational set operators (intersection, union, etc.)
func (*SetRel) CopyWithExpressionRewrite ¶ added in v0.5.0
func (s *SetRel) CopyWithExpressionRewrite(_ RewriteFunc, newInputs ...Rel) (Rel, error)
func (*SetRel) GetAdvancedExtension ¶ added in v0.4.0
func (s *SetRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*SetRel) RecordType ¶ added in v0.4.0
func (s *SetRel) RecordType() types.StructType
func (*SetRel) ToProtoPlanRel ¶ added in v0.4.0
type SingleInputRel ¶ added in v0.4.0
SingleInputRel is a convenience interface representing any relation that consists of exactly one input relation, such as a filter.
type SortRel ¶ added in v0.4.0
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 ¶ added in v0.5.0
func (sr *SortRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, newInputs ...Rel) (Rel, error)
func (*SortRel) GetAdvancedExtension ¶ added in v0.4.0
func (sr *SortRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*SortRel) RecordType ¶ added in v0.4.0
func (sr *SortRel) RecordType() types.StructType
func (*SortRel) ToProtoPlanRel ¶ added in v0.4.0
type Stats ¶ added in v0.4.0
type Stats = proto.RelCommon_Hint_Stats
type VirtualTableReadRel ¶ added in v0.4.0
type VirtualTableReadRel struct {
// contains filtered or unexported fields
}
VirtualTableReadRel represents a table composed of literals.
func (*VirtualTableReadRel) BaseSchema ¶ added in v0.4.0
func (b *VirtualTableReadRel) BaseSchema() types.NamedStruct
func (*VirtualTableReadRel) BestEffortFilter ¶ added in v0.4.0
func (b *VirtualTableReadRel) BestEffortFilter() expr.Expression
func (*VirtualTableReadRel) Copy ¶ added in v0.5.0
func (v *VirtualTableReadRel) Copy(_ ...Rel) (Rel, error)
func (*VirtualTableReadRel) CopyWithExpressionRewrite ¶ added in v0.5.0
func (v *VirtualTableReadRel) CopyWithExpressionRewrite(rewriteFunc RewriteFunc, _ ...Rel) (Rel, error)
func (*VirtualTableReadRel) Filter ¶ added in v0.4.0
func (b *VirtualTableReadRel) Filter() expr.Expression
func (*VirtualTableReadRel) GetAdvancedExtension ¶ added in v0.4.0
func (b *VirtualTableReadRel) GetAdvancedExtension() *extensions.AdvancedExtension
func (*VirtualTableReadRel) GetInputs ¶ added in v0.5.0
func (b *VirtualTableReadRel) GetInputs() []Rel
func (*VirtualTableReadRel) Projection ¶ added in v0.4.0
func (b *VirtualTableReadRel) Projection() *expr.MaskExpression
func (*VirtualTableReadRel) RecordType ¶ added in v0.4.0
func (b *VirtualTableReadRel) RecordType() types.StructType
func (*VirtualTableReadRel) SetProjection ¶ added in v1.2.0
func (b *VirtualTableReadRel) SetProjection(p *expr.MaskExpression)
func (*VirtualTableReadRel) ToProto ¶ added in v0.4.0
func (v *VirtualTableReadRel) ToProto() *proto.Rel
func (*VirtualTableReadRel) ToProtoPlanRel ¶ added in v0.4.0
func (v *VirtualTableReadRel) ToProtoPlanRel() *proto.PlanRel
func (*VirtualTableReadRel) Values ¶ added in v0.4.0
func (v *VirtualTableReadRel) Values() []expr.StructLiteralValue
type WriteOp ¶ added in v1.2.0
type WriteOp = proto.WriteRel_WriteOp