Closed
Description
Describe the bug
Seen in datafusion-testing/data/sqlite/random/expr/slt_good_102.slt:
# Datafusion - Datafusion expected results:
# Datafusion - Expected - -704522
query error
SELECT - 79 * + 91 * - COUNT ( * ) * + - 2 * + - NULLIF ( - 49, - COALESCE ( - + 69, - COALESCE ( + COALESCE ( - 20, ( - 18 ) * + COUNT ( * ) + - 93, - CASE 51 WHEN + COUNT ( * ) + 28 THEN 0 ELSE + 29 * + CASE ( 50 ) WHEN - ( - ( CASE WHEN NOT + 37 IS NULL THEN + COUNT ( * ) END ) ) THEN NULL WHEN - 46 + 87 * - 28 THEN 85 WHEN - COUNT ( * ) THEN NULL END END ), COUNT ( * ) - 39 ) * + 22 ) / - COUNT ( * ) )
----
DataFusion error: Internal error: predicate did not evaluate to an array.
This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker
To Reproduce
See above sql.
Expected behavior
Result should be -704522 which is what both Postgresql and duckdb return
Additional context
No response