On Tue, Mar 10, 2020 at 9:12 PM Andy Fan <zhihui.fan1...@gmail.com> wrote:
>
>
> Hi Tom & David & Bapat:
>
> Thanks for your review so far.  I want to summarize the current issues to help
> our following discussion.
>
> 1. Shall we bypass the AggNode as well with the same logic.
>
> I think yes, since the rules to bypass a AggNode and UniqueNode is exactly 
> same.
> The difficulty of bypassing AggNode is the current aggregation function call 
> is closely
> coupled with AggNode.  In the past few days, I have make the aggregation call 
> can
> run without AggNode (at least I tested sum(without finalized  fn),  avg (with 
> finalized fn)).
> But there are a few things to do, like acl check,  anynull check and maybe 
> more check.
> also there are some MemoryContext mess up need to fix.
> I still need some time for this goal,  so I think the complex of it deserves 
> another thread
> to discuss it,  any thought?

I think if the relation underlying an Agg node is know to be unique
for given groupByClause, we could safely use AGG_SORTED strategy.
Though the input is not ordered, it's sorted thus for every row Agg
node will combine/finalize the aggregate result.

-- 
Best Wishes,
Ashutosh Bapat


Reply via email to