erenavsarogullari opened a new issue, #20483:
URL: https://github.com/apache/datafusion/issues/20483
### Describe the bug
Currently, when Spark `shuffle` function returns following error message
when `seed` is `null`. This needs to be fixed by exposing `NULL` instead of
`'Int64'`.
Current:
```
query error
SELECT shuffle([2, 1], NULL);
----
DataFusion error: Execution error: shuffle seed must be Int64 type, got
'Int64'
```
New:
```
query error DataFusion error: Execution error: shuffle seed must be Int64
type but got 'NULL'
SELECT shuffle([1, 2, 3], NULL);
```
In addition to this fix, this PR also introduces following refactoring to
`shuffle` function:
- Combining args validation checks with `single` error message,
- Extending current error message with expected data types:
```
Current:
shuffle does not support type '{array_type}'.
New:
shuffle does not support type '{array_type}'. Expected types: List,
LargeList, FixedSizeList or Null."
```
- Adding new UT coverages for both `shuffle.rs` and `shuffle.slt`.
### To Reproduce
Explained under description section.
### Expected behavior
Explained under description section.
### Additional context
_No response_
--
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]