Describe the bug
Currently, Spark slice function accepts Null Arrays and return Null for this particular queries. DataFusion-Spark slice function also needs to return NULL when Null Array is set.
Spark Behavior (tested with latest Spark master):
> SELECT slice(NULL, 1, 2);
+-----------------+
|slice(NULL, 1, 2)|
+-----------------+
| null|
+-----------------+
DF Behaviour:
Current:
query error
SELECT slice(NULL, 1, 2);
----
DataFusion error: Internal error: could not cast array of type Null to arrow_array::array::list_array::GenericListArray<i32>.
This issue was likely caused by a bug in DataFusion's code. Please help us to resolve this by filing a bug report in our issue tracker: https://github.com/apache/datafusion/issues
New:
query ?
SELECT slice(NULL, 1, 2);
----
NULL
To Reproduce
Explained under description section.
Expected behavior
Explained under description section.
Additional context
No response
Describe the bug
Currently, Spark
slicefunction accepts Null Arrays and returnNullfor this particular queries. DataFusion-Sparkslicefunction also needs to returnNULLwhen Null Array is set.Spark Behavior (tested with latest Spark master):
DF Behaviour:
Current:
New:
To Reproduce
Explained under description section.
Expected behavior
Explained under description section.
Additional context
No response