alamb edited a comment on pull request #288:
URL: https://github.com/apache/arrow-datafusion/pull/288#issuecomment-840763111


   @jorgecarleitao  Also, I am not convinced about how valuable a general 
purpose `StatefulFunction` will be (though of course it depends on a proposal 
that is not yet written ;) ) 
   
   
   This is due to:
   1. You can write such a function today as a `ScalarFunction` -- via a 
closure with an `Arc<...>` with shared state. I don't see much advantage to 
building that into DataFusion. Window functions I think are going to have to be 
their own thing (like `SortExpr` and `AggregateExpr`.
   1. Given there is no way to know what order DataFusion will pass inputs to 
your functions (across threads, repartitioned, etc) I can't think of a usecase 
at this moment 🤔 


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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to