liukun4515 opened a new issue, #10247:
URL: https://github.com/apache/datafusion/issues/10247
I think the idea here is that expectation is that `rand` is
invoked *once per row* rather than *once per batch*. And the only way it knew
how many rows to make is to get a null array in 🤔
For example, when I run `datafusion-cli` from this PR to call random() the
same value is returned for each row:
```sql
> create table foo as values (1), (2), (3), (4), (5);
0 row(s) fetched.
Elapsed 0.018 seconds.
> select column1, random() from foo;
+---------+--------------------+
| column1 | random() |
+---------+--------------------+
| 1 | 0.9594375709000513 |
| 2 | 0.9594375709000513 |
| 3 | 0.9594375709000513 |
| 4 | 0.9594375709000513 |
| 5 | 0.9594375709000513 |
+---------+--------------------+
5 row(s) fetched.
Elapsed 0.012 seconds.
```
But I expect that each row has a different value for `random()`
However, since none of the tests failed, clearly we have a gap in test
coverage 🤔
_Originally posted by @alamb in
https://github.com/apache/datafusion/pull/10193#discussion_r1576674821_
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]