tidb: github.com/pingcap/tidb/util/plancodec Index | Files

package plancodec

import "github.com/pingcap/tidb/util/plancodec"


Package Files

codec.go id.go


const (
    // TypeSel is the type of Selection.
    TypeSel = "Selection"
    // TypeSet is the type of Set.
    TypeSet = "Set"
    // TypeProj is the type of Projection.
    TypeProj = "Projection"
    // TypeAgg is the type of Aggregation.
    TypeAgg = "Aggregation"
    // TypeStreamAgg is the type of StreamAgg.
    TypeStreamAgg = "StreamAgg"
    // TypeHashAgg is the type of HashAgg.
    TypeHashAgg = "HashAgg"
    // TypeShow is the type of show.
    TypeShow = "Show"
    // TypeJoin is the type of Join.
    TypeJoin = "Join"
    // TypeUnion is the type of Union.
    TypeUnion = "Union"
    // TypePartitionUnion is the type of PartitionUnion
    TypePartitionUnion = "PartitionUnion"
    // TypeTableScan is the type of TableScan.
    TypeTableScan = "TableScan"
    // TypeMemTableScan is the type of TableScan.
    TypeMemTableScan = "MemTableScan"
    // TypeUnionScan is the type of UnionScan.
    TypeUnionScan = "UnionScan"
    // TypeIdxScan is the type of IndexScan.
    TypeIdxScan = "IndexScan"
    // TypeSort is the type of Sort.
    TypeSort = "Sort"
    // TypeTopN is the type of TopN.
    TypeTopN = "TopN"
    // TypeLimit is the type of Limit.
    TypeLimit = "Limit"
    // TypeHashJoin is the type of hash join.
    TypeHashJoin = "HashJoin"
    // TypeMergeJoin is the type of merge join.
    TypeMergeJoin = "MergeJoin"
    // TypeIndexJoin is the type of index look up join.
    TypeIndexJoin = "IndexJoin"
    // TypeIndexMergeJoin is the type of index look up merge join.
    TypeIndexMergeJoin = "IndexMergeJoin"
    // TypeIndexHashJoin is the type of index nested loop hash join.
    TypeIndexHashJoin = "IndexHashJoin"
    // TypeApply is the type of Apply.
    TypeApply = "Apply"
    // TypeMaxOneRow is the type of MaxOneRow.
    TypeMaxOneRow = "MaxOneRow"
    // TypeExists is the type of Exists.
    TypeExists = "Exists"
    // TypeDual is the type of TableDual.
    TypeDual = "TableDual"
    // TypeLock is the type of SelectLock.
    TypeLock = "SelectLock"
    // TypeInsert is the type of Insert
    TypeInsert = "Insert"
    // TypeUpdate is the type of Update.
    TypeUpdate = "Update"
    // TypeDelete is the type of Delete.
    TypeDelete = "Delete"
    // TypeIndexLookUp is the type of IndexLookUp.
    TypeIndexLookUp = "IndexLookUp"
    // TypeTableReader is the type of TableReader.
    TypeTableReader = "TableReader"
    // TypeIndexReader is the type of IndexReader.
    TypeIndexReader = "IndexReader"
    // TypeWindow is the type of Window.
    TypeWindow = "Window"
    // TypeShuffle is the type of Shuffle.
    TypeShuffle = "Shuffle"
    // TypeShuffleDataSourceStub is the type of Shuffle.
    TypeShuffleDataSourceStub = "ShuffleDataSourceStub"
    // TypeTiKVSingleGather is the type of TiKVSingleGather.
    TypeTiKVSingleGather = "TiKVSingleGather"
    // TypeIndexMerge is the type of IndexMergeReader
    TypeIndexMerge = "IndexMerge"
    // TypePointGet is the type of PointGetPlan.
    TypePointGet = "Point_Get"
    // TypeShowDDLJobs is the type of show ddl jobs.
    TypeShowDDLJobs = "ShowDDLJobs"
    // TypeBatchPointGet is the type of BatchPointGetPlan.
    TypeBatchPointGet = "Batch_Point_Get"
    // TypeClusterMemTableReader is the type of TableReader.
    TypeClusterMemTableReader = "ClusterMemTableReader"
    // TypeDataSource is the type of DataSource.
    TypeDataSource = "DataSource"

func Compress Uses

func Compress(input []byte) string

Compress is used to compress the input with zlib.

func DecodeNormalizedPlan Uses

func DecodeNormalizedPlan(planString string) (string, error)

DecodeNormalizedPlan decodes the string to plan tree.

func DecodePlan Uses

func DecodePlan(planString string) (string, error)

DecodePlan use to decode the string to plan tree.

func EncodePlanNode Uses

func EncodePlanNode(depth, pid int, planType string, isRoot bool, rowCount float64, explainInfo string, buf *bytes.Buffer)

EncodePlanNode is used to encode the plan to a string.

func NormalizePlanNode Uses

func NormalizePlanNode(depth, pid int, planType string, isRoot bool, explainInfo string, buf *bytes.Buffer)

NormalizePlanNode is used to normalize the plan to a string.

func PhysicalIDToTypeString Uses

func PhysicalIDToTypeString(id int) string

PhysicalIDToTypeString converts the plan id to plan type string.

func TypeStringToPhysicalID Uses

func TypeStringToPhysicalID(tp string) int

TypeStringToPhysicalID converts the plan type string to plan id.

Package plancodec imports 8 packages (graph) and is imported by 13 packages. Updated 2020-06-01. Refresh now. Tools for package owners.