Hi Mr.Pyhalov.
Thank you for comments.
> In postgres_fdw.sql
>
> "Partial aggregates are unsafe to push down having clause when there are
> partial aggregates" - this comment likely should be fixed.
Fixed.
> Some comments should be added to setGroupClausePartial() and to
> make_partial_grouping_target() - especially why setGroupClausePartial()
> is called prior to add_new_columns_to_pathtarget().
I have added comments to setGroupClausePartial() and to make_partial_grouping_target().
> I'm not sure that I like this mechanics of adding sort group clauses -
> it seems we do in core additional work, which is of use only for
> one extension, but at least it seems to be working.
We cannot deparse the original sort group clauses and pathtarget
when performing partial aggreggate pushdown by any FDWs.
So I think the additional sort group clauses and pathtarget are
needed by any FDWs, not only postgres_fdw.
Sincerely yours,
Yuuki Fujii
--
Yuuki Fujii
Information Technology R&D Center Mitsubishi Electric Corporation