Documentation ¶
Overview ¶
Plan package converts the AST (expr package) into a plan, which is a DAG of tasks that comprise that plan, the planner is pluggable. The plan tasks are converted to executeable plan in exec.
Package plan is a generated protocol buffer package. It is generated from these files: plan.proto It has these top-level messages: PlanPb SelectPb ContextPb SourcePb WherePb GroupByPb HavingPb OrderPb JoinMergePb JoinKeyPb
Index ¶
- Variables
- func RewriteDescribeAsSelect(stmt *rel.SqlDescribe, ctx *Context) (*rel.SqlSelect, error)
- func RewriteShowAsSelect(stmt *rel.SqlShow, ctx *Context) (*rel.SqlSelect, error)
- type Alter
- type Command
- type Context
- type ContextPb
- func (*ContextPb) Descriptor() ([]byte, []int)
- func (m *ContextPb) Marshal() (data []byte, err error)
- func (m *ContextPb) MarshalTo(data []byte) (int, error)
- func (*ContextPb) ProtoMessage()
- func (m *ContextPb) Reset()
- func (m *ContextPb) Size() (n int)
- func (m *ContextPb) String() string
- func (m *ContextPb) Unmarshal(data []byte) error
- type Create
- type Delete
- type Drop
- type GroupBy
- type GroupByPb
- func (*GroupByPb) Descriptor() ([]byte, []int)
- func (m *GroupByPb) Marshal() (data []byte, err error)
- func (m *GroupByPb) MarshalTo(data []byte) (int, error)
- func (*GroupByPb) ProtoMessage()
- func (m *GroupByPb) Reset()
- func (m *GroupByPb) Size() (n int)
- func (m *GroupByPb) String() string
- func (m *GroupByPb) Unmarshal(data []byte) error
- type Having
- type HavingPb
- func (*HavingPb) Descriptor() ([]byte, []int)
- func (m *HavingPb) Marshal() (data []byte, err error)
- func (m *HavingPb) MarshalTo(data []byte) (int, error)
- func (*HavingPb) ProtoMessage()
- func (m *HavingPb) Reset()
- func (m *HavingPb) Size() (n int)
- func (m *HavingPb) String() string
- func (m *HavingPb) Unmarshal(data []byte) error
- type Insert
- type Into
- type JoinKey
- type JoinKeyPb
- func (*JoinKeyPb) Descriptor() ([]byte, []int)
- func (m *JoinKeyPb) Marshal() (data []byte, err error)
- func (m *JoinKeyPb) MarshalTo(data []byte) (int, error)
- func (*JoinKeyPb) ProtoMessage()
- func (m *JoinKeyPb) Reset()
- func (m *JoinKeyPb) Size() (n int)
- func (m *JoinKeyPb) String() string
- func (m *JoinKeyPb) Unmarshal(data []byte) error
- type JoinMerge
- type JoinMergePb
- func (*JoinMergePb) Descriptor() ([]byte, []int)
- func (m *JoinMergePb) Marshal() (data []byte, err error)
- func (m *JoinMergePb) MarshalTo(data []byte) (int, error)
- func (*JoinMergePb) ProtoMessage()
- func (m *JoinMergePb) Reset()
- func (m *JoinMergePb) Size() (n int)
- func (m *JoinMergePb) String() string
- func (m *JoinMergePb) Unmarshal(data []byte) error
- type NextIdFunc
- type Order
- type OrderPb
- func (*OrderPb) Descriptor() ([]byte, []int)
- func (m *OrderPb) Marshal() (data []byte, err error)
- func (m *OrderPb) MarshalTo(data []byte) (int, error)
- func (*OrderPb) ProtoMessage()
- func (m *OrderPb) Reset()
- func (m *OrderPb) Size() (n int)
- func (m *OrderPb) String() string
- func (m *OrderPb) Unmarshal(data []byte) error
- type PlanBase
- func (m *PlanBase) Add(task Task) error
- func (m *PlanBase) Children() []Task
- func (m *PlanBase) Close() error
- func (m *PlanBase) Equal(t Task) bool
- func (m *PlanBase) EqualBase(p *PlanBase) bool
- func (m *PlanBase) IsParallel() bool
- func (m *PlanBase) IsSequential() bool
- func (m *PlanBase) Run() error
- func (m *PlanBase) SetParallel()
- func (m *PlanBase) SetSequential()
- func (m *PlanBase) ToPb() (*PlanPb, error)
- func (m *PlanBase) Walk(p Planner) error
- type PlanPb
- func (*PlanPb) Descriptor() ([]byte, []int)
- func (m *PlanPb) Marshal() (data []byte, err error)
- func (m *PlanPb) MarshalTo(data []byte) (int, error)
- func (*PlanPb) ProtoMessage()
- func (m *PlanPb) Reset()
- func (m *PlanPb) Size() (n int)
- func (m *PlanPb) String() string
- func (m *PlanPb) Unmarshal(data []byte) error
- type Planner
- type PlannerDefault
- func (m *PlannerDefault) WalkAlter(p *Alter) error
- func (m *PlannerDefault) WalkCommand(p *Command) error
- func (m *PlannerDefault) WalkCreate(p *Create) error
- func (m *PlannerDefault) WalkDelete(p *Delete) error
- func (m *PlannerDefault) WalkDrop(p *Drop) error
- func (m *PlannerDefault) WalkInsert(p *Insert) error
- func (m *PlannerDefault) WalkInto(p *Into) error
- func (m *PlannerDefault) WalkLiteralQuery(p *Select) error
- func (m *PlannerDefault) WalkPreparedStatement(p *PreparedStatement) error
- func (m *PlannerDefault) WalkProjectionFinal(p *Select) error
- func (m *PlannerDefault) WalkProjectionSource(p *Source) error
- func (m *PlannerDefault) WalkSelect(p *Select) error
- func (m *PlannerDefault) WalkSourceSelect(p *Source) error
- func (m *PlannerDefault) WalkUpdate(p *Update) error
- func (m *PlannerDefault) WalkUpsert(p *Upsert) error
- type PreparedStatement
- type Projection
- type Proto
- type SchemaLoader
- type Select
- func (m *Select) Equal(t Task) bool
- func (m *Select) IsSchemaQuery() bool
- func (m *Select) Marshal() ([]byte, error)
- func (m *Select) MarshalTo(data []byte) (int, error)
- func (m *Select) NeedsFinalProjection() bool
- func (m *Select) Size() (n int)
- func (m *Select) Unmarshal(data []byte) error
- func (m *Select) Walk(p Planner) error
- type SelectPb
- func (*SelectPb) Descriptor() ([]byte, []int)
- func (m *SelectPb) Marshal() (data []byte, err error)
- func (m *SelectPb) MarshalTo(data []byte) (int, error)
- func (*SelectPb) ProtoMessage()
- func (m *SelectPb) Reset()
- func (m *SelectPb) Size() (n int)
- func (m *SelectPb) String() string
- func (m *SelectPb) Unmarshal(data []byte) error
- type SelectTask
- type Source
- func (m *Source) Context() *Context
- func (m *Source) Equal(t Task) bool
- func (m *Source) IsSchemaQuery() bool
- func (m *Source) LoadConn() error
- func (m *Source) Marshal() ([]byte, error)
- func (m *Source) MarshalTo(data []byte) (n int, err error)
- func (m *Source) Size() (n int)
- func (m *Source) ToPb() (*PlanPb, error)
- func (m *Source) Unmarshal(data []byte) error
- func (m *Source) Walk(p Planner) error
- type SourcePb
- func (*SourcePb) Descriptor() ([]byte, []int)
- func (m *SourcePb) Marshal() (data []byte, err error)
- func (m *SourcePb) MarshalTo(data []byte) (int, error)
- func (*SourcePb) ProtoMessage()
- func (m *SourcePb) Reset()
- func (m *SourcePb) Size() (n int)
- func (m *SourcePb) String() string
- func (m *SourcePb) Unmarshal(data []byte) error
- type SourcePlanner
- type Task
- type Update
- type Upsert
- type Where
- type WherePb
- func (*WherePb) Descriptor() ([]byte, []int)
- func (m *WherePb) Marshal() (data []byte, err error)
- func (m *WherePb) MarshalTo(data []byte) (int, error)
- func (*WherePb) ProtoMessage()
- func (m *WherePb) Reset()
- func (m *WherePb) Size() (n int)
- func (m *WherePb) String() string
- func (m *WherePb) Unmarshal(data []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNotImplemented is plan specific error for not implemented ErrNotImplemented = fmt.Errorf("QLBridge.plan: not implemented") // ErrNoDataSource no datasource/type found ErrNoDataSource = fmt.Errorf("QLBridge.plan: No datasource found") // ErrNoPlan no plan ErrNoPlan = fmt.Errorf("No Plan") )
var ( ErrInvalidLengthPlan = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowPlan = fmt.Errorf("proto: integer overflow") )
Functions ¶
func RewriteDescribeAsSelect ¶
Types ¶
type Command ¶
type Command struct { *PlanBase Ctx *Context Stmt *rel.SqlCommand }
Command for sql commands like SET.
type Context ¶
type Context struct { // Stateful Fields that are transported to participate across network/nodes context.Context // go context for cancelation in plan SchemaName string // schema name to load schema with Raw string // Raw sql statement Stmt rel.SqlStatement // Original Statement Projection *Projection // Projection for this context optional // Local in-memory helpers not transported across network Session expr.ContextReadWriter // Session for this connection Schema *schema.Schema // this schema for this connection Funcs expr.FuncResolver // Local/Dialect specific functions // From configuration DisableRecover bool // Local State Errors []error // contains filtered or unexported fields }
Context for plan of a Relational task has info about the query projection, schema, function resolvers necessary to plan this statement. - may be transported across network boundaries to particpate in dag of tasks - holds references to in-mem data structures for schema - holds references to original statement - holds task specific state for errors, ids, etc (net.context) - manages Recover() - to persist/transport state
func NewContextFromPb ¶
type ContextPb ¶
type ContextPb struct { Schema string `protobuf:"bytes,1,req,name=schema" json:"schema"` Id uint64 `protobuf:"varint,2,req,name=id" json:"id"` Fingerprint uint64 `protobuf:"varint,3,req,name=fingerprint" json:"fingerprint"` XXX_unrecognized []byte `json:"-"` }
Context
func (*ContextPb) Descriptor ¶
func (*ContextPb) ProtoMessage ¶
func (*ContextPb) ProtoMessage()
type Create ¶
Create plan for CREATE {SCHEMA|SOURCE|DATABASE}
type Delete ¶
type Delete struct { *PlanBase Stmt *rel.SqlDelete Source schema.ConnDeletion }
Delete plan for sql DELETE where
type GroupBy ¶
GroupBy clause plan
func GroupByFromPB ¶
func NewGroupBy ¶
NewGroupBy from SqlSelect statement.
type GroupByPb ¶
type GroupByPb struct { Select *rel.SqlSelectPb `protobuf:"bytes,1,opt,name=select" json:"select,omitempty"` XXX_unrecognized []byte `json:"-"` }
Group By Plan
func (*GroupByPb) Descriptor ¶
func (*GroupByPb) ProtoMessage ¶
func (*GroupByPb) ProtoMessage()
type HavingPb ¶
type HavingPb struct { Select *rel.SqlSelectPb `protobuf:"bytes,1,opt,name=select" json:"select,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*HavingPb) Descriptor ¶
func (*HavingPb) ProtoMessage ¶
func (*HavingPb) ProtoMessage()
type Insert ¶
type Insert struct { *PlanBase Stmt *rel.SqlInsert Source schema.ConnUpsert }
Insert plan
type JoinKeyPb ¶
type JoinKeyPb struct { Having *expr.NodePb `protobuf:"bytes,1,opt,name=having" json:"having,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*JoinKeyPb) Descriptor ¶
func (*JoinKeyPb) ProtoMessage ¶
func (*JoinKeyPb) ProtoMessage()
type JoinMerge ¶
type JoinMerge struct { *PlanBase Left Task Right Task LeftFrom *rel.SqlSource RightFrom *rel.SqlSource ColIndex map[string]int }
JoinMerge 2 source/input tasks for join
func NewJoinMerge ¶
NewJoinMerge A parallel join merge, uses Key() as value to merge two different input task/channels.
left source -> \ -- join --> / right source ->
type JoinMergePb ¶
type JoinMergePb struct { Having *expr.NodePb `protobuf:"bytes,1,opt,name=having" json:"having,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*JoinMergePb) Descriptor ¶
func (*JoinMergePb) Descriptor() ([]byte, []int)
func (*JoinMergePb) Marshal ¶
func (m *JoinMergePb) Marshal() (data []byte, err error)
func (*JoinMergePb) ProtoMessage ¶
func (*JoinMergePb) ProtoMessage()
func (*JoinMergePb) Reset ¶
func (m *JoinMergePb) Reset()
func (*JoinMergePb) Size ¶
func (m *JoinMergePb) Size() (n int)
func (*JoinMergePb) String ¶
func (m *JoinMergePb) String() string
func (*JoinMergePb) Unmarshal ¶
func (m *JoinMergePb) Unmarshal(data []byte) error
type NextIdFunc ¶
type NextIdFunc func() uint64
NextIdFunc is the id generation function to give statements their own id
var NextId NextIdFunc
NextId is the global next id generation function
type OrderPb ¶
type OrderPb struct { Select *rel.SqlSelectPb `protobuf:"bytes,1,opt,name=select" json:"select,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*OrderPb) Descriptor ¶
func (*OrderPb) ProtoMessage ¶
func (*OrderPb) ProtoMessage()
type PlanBase ¶
type PlanBase struct { RootTask Task // Root task // contains filtered or unexported fields }
PlanBase holds dag of child tasks
func NewPlanBase ¶
func (*PlanBase) IsParallel ¶
func (*PlanBase) IsSequential ¶
func (*PlanBase) SetParallel ¶
func (m *PlanBase) SetParallel()
func (*PlanBase) SetSequential ¶
func (m *PlanBase) SetSequential()
type PlanPb ¶
type PlanPb struct { Parallel bool `protobuf:"varint,1,req,name=parallel" json:"parallel"` Select *SelectPb `protobuf:"bytes,3,opt,name=select" json:"select,omitempty"` Source *SourcePb `protobuf:"bytes,4,opt,name=source" json:"source,omitempty"` Where *WherePb `protobuf:"bytes,5,opt,name=where" json:"where,omitempty"` Having *HavingPb `protobuf:"bytes,6,opt,name=having" json:"having,omitempty"` GroupBy *GroupByPb `protobuf:"bytes,7,opt,name=groupBy" json:"groupBy,omitempty"` Order *OrderPb `protobuf:"bytes,8,opt,name=order" json:"order,omitempty"` JoinMerge *JoinMergePb `protobuf:"bytes,9,opt,name=joinMerge" json:"joinMerge,omitempty"` JoinKey *JoinKeyPb `protobuf:"bytes,10,opt,name=joinKey" json:"joinKey,omitempty"` Projection *rel.ProjectionPb `protobuf:"bytes,11,opt,name=projection" json:"projection,omitempty"` Children []*PlanPb `protobuf:"bytes,12,rep,name=children" json:"children,omitempty"` XXX_unrecognized []byte `json:"-"` }
The generic Node, must be exactly one of these types
func (*PlanPb) Descriptor ¶
func (*PlanPb) ProtoMessage ¶
func (*PlanPb) ProtoMessage()
type Planner ¶
type Planner interface { // DML Statements WalkSelect(p *Select) error WalkInsert(p *Insert) error WalkUpsert(p *Upsert) error WalkUpdate(p *Update) error WalkDelete(p *Delete) error WalkInto(p *Into) error WalkSourceSelect(p *Source) error WalkProjectionSource(p *Source) error WalkProjectionFinal(p *Select) error // Other Statements WalkPreparedStatement(p *PreparedStatement) error WalkCommand(p *Command) error // DDL operations WalkCreate(p *Create) error WalkDrop(p *Drop) error WalkAlter(p *Alter) error }
Planner interface for planners. Planners take a statement and walk the statement to create a DAG of tasks representing necessary sub-tasks to fulfil statement. implementations of planners: - qlbridge/exec package implements a non-distributed query-planner - dataux/planner implements a distributed query-planner
type PlannerDefault ¶
type PlannerDefault struct { Planner Planner Ctx *Context // contains filtered or unexported fields }
PlannerDefault is implementation of Planner that creates a dag of plan.Tasks that will be turned into execution plan by executor. This is a simple planner but can be over-ridden by providing a Planner that will supercede any single or more visit methods. - stateful, specific to a single request
func NewPlanner ¶
func NewPlanner(ctx *Context) *PlannerDefault
NewPlanner creates a new default planner with context.
func (*PlannerDefault) WalkAlter ¶
func (m *PlannerDefault) WalkAlter(p *Alter) error
WalkAlter walk a ALTER Plan to create the dag of tasks forAlter.
func (*PlannerDefault) WalkCommand ¶
func (m *PlannerDefault) WalkCommand(p *Command) error
WalkCommand walks the command statement
func (*PlannerDefault) WalkCreate ¶
func (m *PlannerDefault) WalkCreate(p *Create) error
WalkCreate walk a Create Plan to create the dag of tasks for Create.
func (*PlannerDefault) WalkDelete ¶
func (m *PlannerDefault) WalkDelete(p *Delete) error
func (*PlannerDefault) WalkDrop ¶
func (m *PlannerDefault) WalkDrop(p *Drop) error
WalkDrop walks the draop statement
func (*PlannerDefault) WalkInsert ¶
func (m *PlannerDefault) WalkInsert(p *Insert) error
func (*PlannerDefault) WalkInto ¶
func (m *PlannerDefault) WalkInto(p *Into) error
func (*PlannerDefault) WalkLiteralQuery ¶
func (m *PlannerDefault) WalkLiteralQuery(p *Select) error
WalkLiteralQuery Handle Literal queries such as "SELECT 1, @var;"
func (*PlannerDefault) WalkPreparedStatement ¶
func (m *PlannerDefault) WalkPreparedStatement(p *PreparedStatement) error
WalkPreparedStatement not implemented
func (*PlannerDefault) WalkProjectionFinal ¶
func (m *PlannerDefault) WalkProjectionFinal(p *Select) error
WalkProjectionFinal walk the select plan to create final projection.
func (*PlannerDefault) WalkProjectionSource ¶
func (m *PlannerDefault) WalkProjectionSource(p *Source) error
WalkProjectionSource non final projection (ie, per from).
func (*PlannerDefault) WalkSelect ¶
func (m *PlannerDefault) WalkSelect(p *Select) error
WalkSelect walk a select statement filling out plan.
func (*PlannerDefault) WalkSourceSelect ¶
func (m *PlannerDefault) WalkSourceSelect(p *Source) error
WalkSourceSelect is a single source select
func (*PlannerDefault) WalkUpdate ¶
func (m *PlannerDefault) WalkUpdate(p *Update) error
func (*PlannerDefault) WalkUpsert ¶
func (m *PlannerDefault) WalkUpsert(p *Upsert) error
type PreparedStatement ¶
type PreparedStatement struct { *PlanBase Stmt *rel.PreparedStatement }
PreparedStatement plan
func (*PreparedStatement) Walk ¶
func (m *PreparedStatement) Walk(p Planner) error
type Projection ¶
type Projection struct { *PlanBase Final bool // Is this final projection or not? P *Select Stmt *rel.SqlSelect Proj *rel.Projection }
Projection holds original query for column info and schema/field types
func NewProjectionFinal ¶
func NewProjectionFinal(ctx *Context, p *Select) (*Projection, error)
Final Projections project final select columns for result-writing
func NewProjectionInProcess ¶
func NewProjectionInProcess(stmt *rel.SqlSelect) *Projection
func NewProjectionStatic ¶
func NewProjectionStatic(proj *rel.Projection) *Projection
A static projection has already had its column/types defined
and doesn't need to use internal schema to find it, often internal SHOW/DESCRIBE
func ProjectionFromPB ¶
func ProjectionFromPB(pb *PlanPb, sel *rel.SqlSelect) *Projection
ProjectionFromPB create Projection from Protobuf.
func (*Projection) Equal ¶
func (m *Projection) Equal(t Task) bool
Equal checks if two tasks are equal.
type Proto ¶
type Proto interface { proto.Marshaler proto.Unmarshaler }
Proto interface to ensure implements protobuf marshalling.
type SchemaLoader ¶
SchemaLoader func interface for loading schema.
type Select ¶
type Select struct { *PlanBase Ctx *Context From []*Source Stmt *rel.SqlSelect ChildDag bool // contains filtered or unexported fields }
Select plan
func SelectFromPB ¶
func SelectFromPB(pb *PlanPb, loader SchemaLoader) (*Select, error)
func SelectPlanFromPbBytes ¶
func SelectPlanFromPbBytes(pb []byte, loader SchemaLoader) (*Select, error)
SelectPlanFromPbBytes Create a sql plan from pb.
func (*Select) IsSchemaQuery ¶
func (*Select) NeedsFinalProjection ¶
type SelectPb ¶
type SelectPb struct { Select *rel.SqlSelectPb `protobuf:"bytes,1,req,name=select" json:"select,omitempty"` Context *ContextPb `protobuf:"bytes,2,opt,name=context" json:"context,omitempty"` XXX_unrecognized []byte `json:"-"` }
Select Plan
func (*SelectPb) Descriptor ¶
func (*SelectPb) ProtoMessage ¶
func (*SelectPb) ProtoMessage()
type SelectTask ¶
SelectTask interface to check equality
type Source ¶
type Source struct { *PlanBase // Request Information, if cross-node distributed query must be serialized *SourcePb Stmt *rel.SqlSource // The sub-query statement (may have been rewritten) Proj *rel.Projection // projection for this sub-query ExecPlan Proto // If SourceExec has a plan? Custom u.JsonHelper // Source specific context info DataSource schema.Source // The data source for this From Conn schema.Conn // Connection for this source, only for this source/task Schema *schema.Schema // Schema for this source/from Tbl *schema.Table // Table schema for this From Static []driver.Value // this is static data source Cols []string // contains filtered or unexported fields }
Source defines a source Within a Select query, it optionally has multiple sources such as sub-select, join, etc this is the plan for a each source
func NewSourceStaticPlan ¶
func (*Source) IsSchemaQuery ¶
type SourcePb ¶
type SourcePb struct { // do we need group-by, join, partition key for routing purposes? NeedsHashableKey bool `protobuf:"varint,2,req,name=needsHashableKey" json:"needsHashableKey"` // Is this final projection or not? non finals are partial-sub-query types Final bool `protobuf:"varint,3,req,name=final" json:"final"` // Is this plan complete as is? skip remaining plan walk steps Complete bool `protobuf:"varint,4,req,name=complete" json:"complete"` Join bool `protobuf:"varint,5,req,name=join" json:"join"` SourceExec bool `protobuf:"varint,6,req,name=sourceExec" json:"sourceExec"` Custom []byte `protobuf:"bytes,7,opt,name=custom" json:"custom,omitempty"` SqlSource *rel.SqlSourcePb `protobuf:"bytes,8,opt,name=sqlSource" json:"sqlSource,omitempty"` Projection *rel.ProjectionPb `protobuf:"bytes,9,opt,name=projection" json:"projection,omitempty"` XXX_unrecognized []byte `json:"-"` }
Source Plan is a plan for single source of select query, of which many may exist (joins, sub-querys etc)
func (*SourcePb) Descriptor ¶
func (*SourcePb) ProtoMessage ¶
func (*SourcePb) ProtoMessage()
type SourcePlanner ¶
type SourcePlanner interface { // given our request statement, turn that into a plan.Task. WalkSourceSelect(pl Planner, s *Source) (Task, error) }
SourcePlanner Sources can often do their own planning for sub-select statements ie mysql can do its own (select, projection) mongo, es can as well - provide interface to allow passing down select planning to source
type Task ¶
type Task interface { // Walk, give a planner to this task to allow // Task to call appropriate parts of planner. Walk(p Planner) error // Children tasks of this, this task may be participating // in parents. Children() []Task // Add a child to this dag Add(Task) error IsSequential() bool SetSequential() IsParallel() bool SetParallel() Equal(Task) bool ToPb() (*PlanPb, error) }
Task interface allows different portions of distributed plans (where, group-by, source-scan, project) to have its own planner. Output is a DAG of tasks to be given to executor. - may be parallel or sequential - must be serializeable to participate in cross network tasks
func SelectTaskFromTaskPb ¶
SelectTaskFromTaskPb create plan task for SqlSelect from pb.
type Update ¶
type Update struct { *PlanBase Stmt *rel.SqlUpdate Source schema.ConnUpsert }
Update plan for sql Update statements.
type Upsert ¶
type Upsert struct { *PlanBase Stmt *rel.SqlUpsert Source schema.ConnUpsert }
Upsert task (not official sql) for sql Upsert.
type Where ¶
Where pre-aggregation filter
func NewWhereFinal ¶
NewWhereFinal from SqlSelect statement.
func WhereFromPB ¶
type WherePb ¶
type WherePb struct { Select *rel.SqlSelectPb `protobuf:"bytes,1,opt,name=select" json:"select,omitempty"` Final bool `protobuf:"varint,2,req,name=final" json:"final"` XXX_unrecognized []byte `json:"-"` }
Where Plan
func (*WherePb) Descriptor ¶
func (*WherePb) ProtoMessage ¶
func (*WherePb) ProtoMessage()