Files
doris/fe/fe-core
minghong d739aa7c53 [enhancement](Nereids) optimization for star-schema join reorder (#12817)
the basic idea of star-schema support is:
1. fact_table JOIN dimension_table, if dimension table are filtered, the result can be regarded as applying a filter on fact table.
2. fact_table JOIN dimension_table, if the dimension table is not filtered, the number of join result tuple equals to the number of fact tuples.
3. dimension table JOIN fact table, the number of join result tuple is that of fact table or 2 times of dimension table.

If star-schema support is enabled:
1. nereids regard duplicate key(unique key/aggregation key) as primary key
2. nereids try to regard one join key as  primary key and another join key as foreign key.
3. if nereids found that no join key is primary key, nereids fall back to normal estimation.
2022-09-28 21:09:55 +08:00
..