sunchao commented on PR #24680: URL: https://github.com/apache/datafusion/pull/24680#issuecomment-5445329890
Thanks @adriangb! I incorporated [your recommended change](https://github.com/pydantic/datafusion/commit/9746f3f0159172f91c4deb41eda2078d284a58f0) in [ec4b3f282](https://github.com/apache/datafusion/pull/24680/commits/ec4b3f282cfb82693cd1fac89eced5f7f5a2dd14), with co-author credit. The row filter now reuses projection's cast-target clipping and estimates read cost from the selected leaves. It preserves the entire cast target, including sibling conversions the query explicitly requested. I strengthened the regression with an unused third sibling: that leaf is pruned while the required `label` conversion still raises its error. The narrow-target case also decodes and evaluates successfully. I added the SQL coverage alongside the existing Rust tests, clarified the comment about when and why Struct ancestors remain, and updated the PR description. General container-to-Struct casting behavior is unchanged; the Dictionary-of-Struct limitation is documented rather than expanded into this PR. Validation passed: the extended workspace suite (**10,795 Rust tests and all 505 SQL logic files**), **107 CLI tests**, eight doctests, formatting, Clippy across all targets/features with warnings denied, and the full repository lint suite. The read-plan regression also failed with the old full-root behavior and passed after restoring the fix. Existing benchmark comparisons against main are recorded in the PR description; they do not directly measure this retained-cast row-filter optimization. -- 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]
