gongxun0928 commented on PR #1178:
URL: https://github.com/apache/cloudberry/pull/1178#issuecomment-2992227707

   > In other words, for the intermediate state data structure NumericAggState 
in the first stage aggregation, all the int64 fields inside can actually be 
changed to int32, not just only the above two.
   
   This approach is challenging. For instance, both the Finalize HashAggregate 
and Partial HashAggregate phases rely on the same workflow—advance_aggregates → 
xxx → do_numeric_accum—to perform numeric accumulation and update the aggregate 
state. If we were to use different NumericAggState structures for different 
phases, we would need to refactor a large number of numeric-related functions 
to support a more compact state data structure.
   Additionally, in finalize_aggregates, we would need to select different 
serialization functions depending on the type of aggsplit. 
   All of these changes would result in significant differences between our 
codebase and upstream PostgreSQL, making future version upgrades more difficult 
to manage. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to