alamb commented on issue #3014:
URL: 
https://github.com/apache/arrow-datafusion/issues/3014#issuecomment-1203948317

   @iajoiner  I don't quite follow what you want to do...
   
   Is it like you want a way to override `PhysicalExpr::execute` for all nodes?
   
   Have you considered a wrapper that does your side effect, something like:
   
   ```rust
   
   struct PhysicalExprWithEffects {
     inner: Arc<dyn PhysicalExpr> 
   }
   
   impl PhysicalExpr for PhysicalExprWithEffects
       fn evaluate(&self, batch: &RecordBatch) -> Result<ColumnarValue> {
         // TODO: add your side effects here
         // then call the inner expr:
         self.inner.evaluate(batch)
       } 
     ...
   }
   ```
   


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

Reply via email to