sgrebnov commented on code in PR #13267: URL: https://github.com/apache/datafusion/pull/13267#discussion_r1830095891
########## datafusion/common/src/config.rs: ########## @@ -636,6 +636,10 @@ config_namespace! { /// then the output will be coerced to a non-view. /// Coerces `Utf8View` to `LargeUtf8`, and `BinaryView` to `LargeBinary`. pub expand_views_at_output: bool, default = false + + /// When set to true, the `optimize_projections` rule will not attempt to move, add, or remove existing projections. + /// This flag helps maintain the original structure of the `LogicalPlan` when converting it back into SQL via the `unparser` module. It ensures the query layout remains simple and readable, relying on the underlying SQL engine to apply its own optimizations during execution. + pub optimize_projections_preserve_existing_projections: bool, default = false Review Comment: Might it be better to make this flag more generic, for example, just `preserve_existing_projections` or `prefer_existing_plan_nodes`, so it can be reused in the future in similar cases -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org