Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:
Description
For trait propagation, it would be useful to be able to create a rule that is fired each time a relational expression (`RelNode`) is available with a set of traits (`RelTraitSet`) that it didn't previously have.
Currently if you create an operand for an input to a relational expression, the rule will be fired every time a relational expression is added to that set (`RelSet`) or subset (`RelSubset`); if you do not create an operand, the rule will be fired once (basically, when the set is created); this would add something in the middle, firing the rule once for each subset. (A subset, you recall, is the combination of a set and a set of traits.)
For instance, you could write a rule for sort-aggregation. If we are trying to evaluate `select ... group by x`, then the rule might fire once for `AggregateRel` on a subset sorted by [y], once for `AggregateRel` on a subset sorted by [x, y], once for an `AggregateRel` sorted on [x]. The firings for [x, y] and [x] could produce a sort-aggregation, because sort-aggregation requires the grouping key to be on the leading edge of the sort-key.
---------------- Imported from GitHub ----------------
Url: https://github.com/julianhyde/optiq/issues/263
Created by: julianhyde
Labels:
Created at: Sat Apr 26 02:32:24 CEST 2014
State: closed