alamb commented on issue #13814:
URL: https://github.com/apache/datafusion/issues/13814#issuecomment-5292709677

   For anyone following along, I think what @Dandandan did was figure out that 
`rustc` was re-checking the whole `Expr` / `LogicalPlan` tree to prove futures 
returned from the catalog's `#[async_trait]` methods were `Send`/`Sync`.  
Apparently `rustc` only caches the result of trait selection sometimes and was 
not in this case -- see 
https://rustc-dev-guide.rust-lang.org/traits/caching.html. 
   
   The fix in the four PRs (https://github.com/apache/datafusion/pull/24325, 
https://github.com/apache/datafusion/pull/24326, 
https://github.com/apache/datafusion/pull/24329, 
https://github.com/apache/datafusion/pull/24330) is to build the future in a 
helper function that can be cached, so the Send/Sync proof lands in the global 
cache and is done once, instead of once per method.
   
   


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