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

   ## Which issue does this PR close?
   
   The current v52 signature pub async fn `wait_complete(self: &Arc<Self>)` is 
a bit unergonomic. When working with Arc<dyn PhysicalExpr>, users can only 
downcast to &DynamicFilterPhysicalExpr via as_any().downcast_ref(), not to 
Arc<DynamicFilterPhysicalExpr>, making the method impossible to call.
   
   The &Arc<Self> param was used to check is_used() via Arc strong count, but 
this was overly defensive.
   ## Rationale for this change
   
   <!--
    Why are you proposing this change? If this is already explained clearly in 
the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your 
changes and offer better suggestions for fixes.  
   -->
   
   ## What changes are included in this PR?
   
   - Changed `DynamicFilterPhysicalExpr::wait_complete` signature from `pub 
async fn wait_complete(self: &Arc<Self>)` to `pub async fn 
wait_complete(&self)`.
   
   - Removed the `is_used()` check from `wait_complete()` - this method, like 
`wait_update()`, should only be called on filters that have consumers. If the 
caller doesn't know whether the filter has consumers, they should call 
`is_used()` first to avoid waiting indefinitely. This approach avoids complex 
signatures and dependencies between the APIs.
   
   ## Are these changes tested?
   
   Yes, existing tests cover this functionality, I removed the "mock" consumer 
from `test_hash_join_marks_filter_complete_empty_build_side` and 
`test_hash_join_marks_filter_complete` since the fix in 
https://github.com/apache/datafusion/pull/19734 makes is_used check the outer 
struct `strong_count` as well.
   
   
   ## Are there any user-facing changes?
   
   The signature of `wait_complete` changed.


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