apache / apache/datafusion-comet

`arrays_except` type mismatch

Open
#3,646 4 comments 0 reactions 0 assignees View on GitHub
area:expressions bug good first issue priority:medium
Dominant language
Scala
Stars
1.3k
Forks
373
Avg merge
2d 6h
Merged PRs (30d)
190

Description

### Describe the bug

```
- sql-file: expressions/array/array_except.sql [parquet.enable.dictionary=true] *** FAILED *** (733 milliseconds)
java.lang.RuntimeException: Error executing SQL 'SELECT array_except(array(1, 2, 3), array(2, 3, 4)), array_except(array(1, 2), array()), array_except(array(), array(1)), array_except(cast(NULL as array), array(1))'. Reason: 'Job aborted due to stage failure: Task 0 in stage 23.0 failed 1 times, most recent failure: Lost task 0.0 in stage 23.0 (TID 103) (192.168.4.142 executor driver): org.apache.comet.CometNativeException: array_except received incompatible types: List(Int32), List(non-null Int32)
```

This happens because exhaustive datatype check in datafusion in `check_datatypes()` function

### Steps to reproduce

_No response_

### Expected behavior

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.