0lai0 opened a new pull request, #4446:
URL: https://github.com/apache/datafusion-comet/pull/4446

   ## Which issue does this PR close?
   Closes #4430
   
   ## Rationale for this change
   `PartialEq<dyn Any>` is the path DataFusion uses to compare `Arc<dyn 
PhysicalExpr>` values in the physical planner. The previous impl only compared 
`expr` and `timezone`, so two `ToJson` expressions that differed only in 
`ignore_null_fields` (or historically, `timezone`) would compare equal through 
that path, risking incorrect deduplication or caching. 
   
   ## What changes are included in this PR? 
   Delegate `PartialEq<dyn Any>` to `self == other`, which calls the regular 
`PartialEq` impl and ensures both paths always compare the same fields.         
                                                                                
                      
   
   ## How are these changes tested?
   Three new unit tests in `json_funcs::to_json::test`:                         
                                                                                
                                                 
   - `test_partial_eq_same`  identical exprs are equal via both paths
   - `test_partial_eq_dyn_any_differs_on_timezone`  different `timezone` is not 
equal via `dyn Any`                                                       
   - `test_partial_eq_dyn_any_differs_on_ignore_null_fields` different 
`ignore_null_fields` is not equal via `dyn Any`    


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