risingwave_frontend::optimizer

Module property

source
Expand description

Define all property of plan tree node, which actually represent property of the node’s result.

We have physical property Order and Distribution which is on batch or stream operator, also, we have logical property which all PlanNode has.

We have not give any common abstract trait for the property yet. They are not so much and we don’t need get a common behavior now. we can treat them as different traits of the PlanNode now and refactor them when our optimizer need more (such as an optimizer based on the Volcano/Cascades model).

Modules§

  • cardinality πŸ”’
  • distribution πŸ”’
    β€œA -> B” represent A satisfies B x only as a required property x can used as both required x and provided property x β”Œβ”€β”€β”€β” xβ”Œβ”€β”€β”€β”€β”€β”€β” β”‚Any◄──────────────────singleβ”‚ β””β”€β–²β”€β”˜ xβ””β”€β”€β”€β”€β”€β”€β”˜ β”‚ x β”‚ x β”‚ x β”Œβ”€β”€β”€β”΄β”€β”€β”€β”€β” xβ”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚AnyShard◄───────────────SomeShard β”‚ β””β”€β”€β”€β–²β”€β”€β”€β”€β”˜ xβ””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ x β”Œβ”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” xβ”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ShardByKey(a,b)◄───┬────HashShard(a,b)β”‚ β”‚HashShard(b,a)β”‚ β””β”€β”€β”€β–²β”€β”€β–²β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ xβ””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ x β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ x β”‚ β”Œβ”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” xβ”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ShardByKey(a)◄────HashShard(a)β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ xβ””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ x β”Œβ”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” xβ”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ShardByKey(b)◄───────HashShard(b)β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ xβ””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ x x
  • func_dep πŸ”’
  • monotonicity πŸ”’
  • order πŸ”’

Structs§

Enums§

  • the distribution property provided by a operator.
  • The upper bound of the Cardinality.
  • Represents the monotonicity of a column.
  • Represents the derivation of the monotonicity of a column. This enum aims to unify the β€œnon-decreasing analysis” and watermark derivation.
  • the distribution property requirement.

Functions§