diff --git a/src/planner/expand_hypertable.c b/src/planner/expand_hypertable.c index 337b0b7c103..61f0156d05a 100644 --- a/src/planner/expand_hypertable.c +++ b/src/planner/expand_hypertable.c @@ -1381,10 +1381,8 @@ ts_plan_expand_hypertable_chunks(Hypertable *ht, PlannerInfo *root, RelOptInfo * /* Adding partition info will make PostgreSQL consider the inheritance * children as part of a partitioned relation. This will enable - * partitionwise aggregation. */ - if ((enable_partitionwise_aggregate && - !has_partialize_function((Node *) root->parse->targetList, TS_DO_NOT_FIX_AGGSPLIT)) || - hypertable_is_distributed(ht)) + * partitionwise aggregation for distributed queries. */ + if (hypertable_is_distributed(ht)) { build_hypertable_partition_info(ht, root, rel, list_length(inh_oids)); }