dariocurr commented on PR #24094: URL: https://github.com/apache/datafusion/pull/24094#issuecomment-5204381608
Made this change. `CoerceSchemaExec` is gone. `UnionExec`/`InterleaveExec` now insert a `ProjectionExec` with `CastExpr::new_with_target_field` (zero-copy for same-type casts), or a plain `Column` when a leg's field already matches. A few side effects: - No more wrapper-erasure trick in proto serialization — `ProjectionExec` has an ordinary proto message. - The projection-collapsing optimizer pass fuses the coercion into a leg's existing top-level `ProjectionExec` for free in several cases. - Fixed a real gap this surfaced: `ProjectionExec` statistics were zeroing `sum_value`/`byte_size` for same-type casts. Now passed through exactly, with a test. Net 119 fewer lines despite added tests. Happy to split the statistics fix into its own PR if you'd rather review it separately. -- 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]
