AnuragRaut08 opened a new pull request, #25297:
URL: https://github.com/apache/datafusion/pull/25297

   ## Which issue does this PR close?
   
   Closes #24777
   
   ## Rationale for this change
   
   Deserializing wide logical plans with `datafusion-proto` can take 
disproportionately longer as the number of projected expressions increases. 
This is because deserialization re-runs expression normalization on logical 
plan nodes that have already been normalized before serialization.
   
   Avoiding this redundant work makes logical plan deserialization more 
efficient, particularly for wide plans.
   
   ## What changes are included in this PR?
   
   Decode `Projection`, `Filter`, `Window`, `Aggregate`, and `Sort` logical 
plan nodes directly through their constructors instead of rebuilding them 
through `LogicalPlanBuilder`.
   
   This avoids the redundant expression normalization performed by the builder 
methods while preserving the serialized logical plan structure.
   
   This implements the constructor-based approach described as fix (2) in 
#24777 and is complementary to #25010, which optimizes the normalization work 
itself.
   
   ## What is the testing strategy for this PR?
   
   The change is covered by the existing logical plan protobuf roundtrip tests, 
which verify that the decoded plans remain equivalent to the serialized plans.
   
   The following tests were run successfully:
   
   * `cargo check -p datafusion-proto`
   * `cargo test -p datafusion-proto --test proto_integration 
roundtrip_logical_plan`
   * `cargo test -p datafusion-proto --test proto_integration 
roundtrip_logical_plan_aggregation`
   * `cargo test -p datafusion-proto --test proto_integration 
roundtrip_logical_plan_sort`
   * `cargo test -p datafusion-proto --test proto_integration roundtrip_window`
   
   No new tests were added because the existing protobuf logical-plan roundtrip 
coverage exercises the affected decode paths.
   
   The full `proto_integration` test suite was also run. It had 254 passing 
tests and 7 failures caused by missing Parquet test data from the 
`parquet-testing` submodule; these failures are unrelated to this change.
   
   ## Are there any user-facing changes?
   
   No.
   


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