This is an automated email from the ASF dual-hosted git repository.
viirya pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new a8c01de492 Minor: Add comment on input_schema from AggregateExec
(#7727)
a8c01de492 is described below
commit a8c01de49259df7ae36d643845b234c12932e473
Author: Liang-Chi Hsieh <[email protected]>
AuthorDate: Fri Oct 6 13:11:53 2023 -0700
Minor: Add comment on input_schema from AggregateExec (#7727)
* Remove input_schema
* Revert "Remove input_schema"
This reverts commit 5096883a82ab94d451974d04660e33deb1b560ea.
* Add comment
---
datafusion/physical-plan/src/aggregates/mod.rs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/datafusion/physical-plan/src/aggregates/mod.rs
b/datafusion/physical-plan/src/aggregates/mod.rs
index 6ab991c6f5..546abcfc4a 100644
--- a/datafusion/physical-plan/src/aggregates/mod.rs
+++ b/datafusion/physical-plan/src/aggregates/mod.rs
@@ -285,7 +285,9 @@ pub struct AggregateExec {
schema: SchemaRef,
/// Input schema before any aggregation is applied. For partial aggregate
this will be the
/// same as input.schema() but for the final aggregate it will be the same
as the input
- /// to the partial aggregate
+ /// to the partial aggregate, i.e., partial and final aggregates have same
`input_schema`.
+ /// We need the input schema of partial aggregate to be able to
deserialize aggregate
+ /// expressions from protobuf for final aggregate.
pub input_schema: SchemaRef,
/// The columns map used to normalize out expressions like Partitioning
and PhysicalSortExpr
/// The key is the column from the input schema and the values are the
columns from the output schema