You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[C++] random function can't actually be used #33181
random() is currently implemented as a nullary function. It doesn't let you specify the number of values you want to generate because it's designed to generate however many the given ExecBatch has. The only option RandomOptions takes seems to be an optional seed value. Unfortunately, the result is that the function is not usable, AFAICT.
Calling the compute function directly, you get 0 values (all examples from R):
Neal Richardson / @nealrichardson:
If it's relevant, I tried a nullary UDF and got the same error about non-scalar expression, so the issues @westonpace suggested are probably the problem and not the random() function itself.
Activity
asfimport commentedon Oct 11, 2022
Weston Pace / @westonpace:
Probably related are ARROW-16286 and ARROW-16290
asfimport commentedon Oct 12, 2022
Neal Richardson / @nealrichardson:
If it's relevant, I tried a nullary UDF and got the same error about non-scalar expression, so the issues @westonpace suggested are probably the problem and not the random() function itself.
thisisnic commentedon Nov 18, 2026
Thanks for reporting this! I'm just going through older bug issues to see if we can close them out or we need further action.
Could not reproduce on 26.0.0. Appears to have been fixed in #39908.