You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "chenkovsky (via GitHub)" <gi...@apache.org> on 2025/09/20 13:15:08 UTC
[I] support seed for random function [datafusion]
chenkovsky opened a new issue, #17686:
URL: https://github.com/apache/datafusion/issues/17686
### Is your feature request related to a problem or challenge?
for example,
in https://github.com/lakehq/sail/blob/main/crates/sail-plan/src/extension/function/math/randn.rs
it seems that every record batch will have same init seed and same random result.
### Describe the solution you'd like
add partition & record_batch_index into evalutate method arguments.
e.g.
```rust
pub trait PhysicalExpr {
fn evaluate(&self, batch: &RecordBatch, partiton: usize, record_batch_index: usize) -> Result<ColumnarValue>;
}
```
then we get different seed for different record batch.
in spark, seeds are different for different partitions.
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
--
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: github-unsubscribe@datafusion.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org