Gabriel39 commented on PR #68452:
URL: https://github.com/apache/doris/pull/68452#issuecomment-6120445202

   Please rework this around the existing aggregate pushdown framework in 
`format_v2`. `MIN/MAX`, `DISTINCT`, and grouping are aggregate operations, so 
partition columns should be supported as inputs within that framework. Extend 
`_supports_aggregate_pushdown()` together with the existing aggregate 
request/result materialization path, and have FE convey whether the upper 
aggregate allows duplicate partition-value rows to be collapsed. In particular, 
support partition constants in the existing MIN/MAX path and reuse the same 
machinery for eligible DISTINCT/grouping cases. Grouping with 
row-count-sensitive aggregates such as `COUNT(*)` or `SUM` must retain its 
original semantics.
   
   Please also preserve empty-input semantics: emit a representative 
partition-value row only when the current range has visible rows; an empty 
range must contribute no row. Use reliable range metadata where possible and 
fall back to normal scanning when that cannot be established. The current 
unconditional `finalize_chunk(block, 1)` can introduce a partition value that a 
normal scan would never return.
   
   Reader v1 under `be/src/format/` is going to be deprecated, so there is no 
need to modify or add support for that path. Please remove the v1-specific 
changes, including `PartitionColumnReader`, its integration in 
`be/src/exec/scan/file_scanner.cpp`, and the associated v1-only test additions, 
and focus this change on `format_v2`.
   


-- 
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