-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Labels
good first issueGood for newcomersGood for newcomersphysical-exprChanges to the physical-expr cratesChanges to the physical-expr crates
Description
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:
> 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 #10193 (comment)
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomersphysical-exprChanges to the physical-expr cratesChanges to the physical-expr crates