pingcap/tidb

propose to use verbs for operator name

Open

#14,575 建立於 2020年1月26日

在 GitHub 查看
 (1 留言) (1 反應) (0 負責人)Go (40,090 star) (6,186 fork)batch import
good first issuehelp wantedsig/plannertype/enhancement

描述

Feature Request

Is your feature request related to a problem? Please describe:

not a problem, just propose a naming style for relational operators.

Describe the feature you'd like:

Relational operator process data, so I think using verbs for their names are more suitable, for example: Sort, Join, Project, Filter, Scan, Gather.

But now, we both have verbs and nouns in naming these operators, for example:

  • noun: LogicalProjection/PhysicalProjection
  • noun: LogicalSelection/PhysicalSelection
  • noun: LogicalMemTable/PhysicalMemTable
  • verb: LogicalJoin/HashJoin/MergeJoin/IndexJoin
  • verb: LogicalApply/PhysicalApply
  • verb: LogicalSort/PhysicalSort
  • verb: LogicalLimit/PhysicalLimit

the proposed name changes:

old name new name
baseLogicalPlan
mockLogicalJoin
LogicalJoin
LogicalProjection LogicalProject
LogicalAggregation LogicalAggregate
LogicalSelection LogicalFiter
LogicalApply
LogicalMaxOneRow
LogicalTableDual LogicalDuleScan
LogicalMemTable LogicalMemTableScan
LogicalUnionScan
LogicalTableScan
LogicalIndexScan
LogicalUnionAll
LogicalSort
LogicalTopN
LogicalLimit
LogicalLock
LogicalWindow
LogicalShow
LogicalShowDDLJobs
LogicalProperty
old name new name
basePhysicalPlan
PhysicalTableReader PhysicalTableGather
PhysicalIndexReader PhysicalIndexGather
PhysicalIndexLookUpReader PhysicalIndexLookupGather
PhysicalIndexMergeReader PhysicalIndexMerge
PhysicalIndexScan
PhysicalMemTable PhysicalMemTableScan
PhysicalTableScan
PhysicalProjection PhysicalProject
PhysicalTopN
PhysicalApply
basePhysicalJoin
PhysicalHashJoin
PhysicalIndexJoin
PhysicalIndexMergeJoin
PhysicalIndexHashJoin
PhysicalMergeJoin
PhysicalLock
PhysicalLimit
PhysicalUnionAll
basePhysicalAgg
PhysicalHashAgg
PhysicalStreamAgg
PhysicalSort
PhysicalUnionScan
PhysicalSelection PhysicalFilter
PhysicalMaxOneRow
PhysicalTableDual PhysicalDualScan
PhysicalWindow
PhysicalShuffle
PhysicalShuffleDataSourceStub
PhysicalShow
PhysicalShowDDLJobs
PhysicalProperty
mockPhysicalIndexReader mockPhysicalIndexGather
mockDataPhysicalPlan ?
mockPhysicalScanLockStream ?

Describe alternatives you've considered:

No

Teachability, Documentation, Adoption, Migration Strategy:

No

貢獻者指南