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

   🤔  -- here is how the built in random function does this: 
https://github.com/apache/arrow-datafusion/blob/51b898288830c224b825523f9be1d54974f15d2f/datafusion/physical-expr/src/math_expressions.rs#L375-L383
   
   And it seems to work as expected:
   ```sql
   ❯ select x, random() from foo;
   +---+---------------------+
   | x | random()            |
   +---+---------------------+
   | 1 | 0.8579996222450448  |
   | 2 | 0.11611126693245999 |
   +---+---------------------+
   2 rows in set. Query took 0.003 seconds.
   ```
   
   I wonder if you can follow what random is doing / getting? If the scalar 
UDFs aren't working the same for some reason, we should fix it so they are. 
   
   I checked and I don't see any obvious special cases for Random 🤔 
   
   
https://github.com/search?q=repo%3Aapache%2Farrow-datafusion+BuiltinScalarFunction%3A%3ARandom&type=code


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