You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/05/10 08:05:03 UTC

[GitHub] [arrow-datafusion] nevi-me commented on a change in pull request #303: WIP add random SQL function

nevi-me commented on a change in pull request #303:
URL: https://github.com/apache/arrow-datafusion/pull/303#discussion_r629129273



##########
File path: datafusion/src/physical_plan/math_expressions.rs
##########
@@ -116,3 +116,12 @@ math_unary_function!("exp", exp);
 math_unary_function!("ln", ln);
 math_unary_function!("log2", log2);
 math_unary_function!("log10", log10);
+
+/// random SQL function
+pub fn random(_: &[ColumnarValue]) -> Result<ColumnarValue> {

Review comment:
       Would it be more efficient if this is implemented as an `arrow::compute` kernel, so that instead of creating individual scalar values, you could fill a buffer of `n` elements with random data at once?




-- 
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:
users@infra.apache.org