Hi Taras, I haven't used hints much but what you describe sounds like a bug.
I would expect that rules should preserve hints if possible. I guess that if a rule removes an operator completely then it may not make sense to retain the hints. Best, Stamatis On Wed, May 26, 2021, 1:26 PM Taras Ledkov <[email protected]> wrote: > Hi, > > I am trying to figure out how to use hints correctly. > > My case: > I've registered hint for Aggregate node to force expand DISTINCT aggregate. > Because is some cases plan with DISTINCT aggregate to JOIN cannot be > chosen by the cost. > > I see that different rules treat hints differently. > e.g.: > - AggregateExpandDistinctAggregatesRule - copy hints of the source node > for new aggregate nodes. > - AggregateReduceFunctionsRule - create new node and looses the original > hints. > > Is is correct behavior and am I missing something at the hints/planner > logic? > > -- > Taras Ledkov > Mail-To: [email protected] > >
