Documentation
¶
Index ¶
- Constants
- func NewRemoteNode(Expr logicalplan.Node) logicalplan.Node
- func Unmarshal(data []byte) (logicalplan.Node, error)
- type DistributedOptimizer
- type FragmentKey
- type Remote
- func (r *Remote) Children() []*logicalplan.Node
- func (r *Remote) Clone() logicalplan.Node
- func (r *Remote) MarshalJSON() ([]byte, error)
- func (r *Remote) ReturnType() parser.ValueType
- func (r *Remote) String() string
- func (r *Remote) Type() logicalplan.NodeType
- func (r *Remote) UnmarshalJSON(data []byte) error
Constants ¶
const (
RemoteNode = "RemoteNode"
)
Variables ¶
This section is empty.
Functions ¶
func NewRemoteNode ¶
func NewRemoteNode(Expr logicalplan.Node) logicalplan.Node
func Unmarshal ¶
func Unmarshal(data []byte) (logicalplan.Node, error)
Unmarshal deserializes a logical plan node from JSON data. This is a custom implementation for Cortex that is copied from Thanos engine's unmarshaling func to support remote nodes. We maintain this separate implementation because Thanos engine's logical plan codec currently doesn't support custom node types in its unmarshaling process.
Types ¶
type DistributedOptimizer ¶
type DistributedOptimizer struct{}
func (*DistributedOptimizer) Optimize ¶
func (d *DistributedOptimizer) Optimize(root logicalplan.Node, opts *query.Options) (logicalplan.Node, annotations.Annotations)
type FragmentKey ¶
type FragmentKey struct {
// contains filtered or unexported fields
}
FragmentKey uniquely identifies a fragment of a distributed logical query plan. It combines a queryID (to identify the overall query) and a fragmentID (to identify the specific fragment within that query).
func MakeFragmentKey ¶
func MakeFragmentKey(queryID uint64, fragmentID uint64) FragmentKey
MakeFragmentKey creates a new FragmentKey with the given queryID and fragmentID. It's used to track and identify fragments during distributed query execution.
func (FragmentKey) GetFragmentID ¶
func (f FragmentKey) GetFragmentID() uint64
GetFragmentID returns the ID for this specific fragment within its parent query.
func (FragmentKey) GetQueryID ¶
func (f FragmentKey) GetQueryID() uint64
GetQueryID returns the queryID for the current key This ID is shared across all fragments of the same distributed query.
type Remote ¶
type Remote struct {
Expr logicalplan.Node `json:"-"`
FragmentKey FragmentKey
FragmentAddr string
}
Remote is a custom node that marks where the portion of logical plan that needs to be executed remotely
func (*Remote) Children ¶
func (r *Remote) Children() []*logicalplan.Node
func (*Remote) Clone ¶
func (r *Remote) Clone() logicalplan.Node
func (*Remote) MarshalJSON ¶
func (*Remote) ReturnType ¶
func (*Remote) Type ¶
func (r *Remote) Type() logicalplan.NodeType