2010YOUY01 opened a new issue, #11561: URL: https://github.com/apache/datafusion/issues/11561
### Describe the bug Bitwise operations are producing various inconsistent behavior during fuzzing. The root cause seems to be bitwise operation evaluation (maybe related to https://github.com/apache/datafusion/issues/11260) However, when bitwise operations are used in the ORDER BY clause, other SORT-related errors show up. We could investigate if this bitwise operation bug might propagate into the SORT logic. ### To Reproduce Reproduce in datafusion-cli This is a potential bug in bitwise operation, `|` of two `DOUBLE` type should not be allowed, it should yield a planning error, but in this case it produces an internal error (https://github.com/apache/datafusion/issues/11249) ``` > select (0.7|0.8); Internal error: Data type Float64 not supported for binary operation 'bitwise_or' on dyn arrays. 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 ``` However, when this expression is placed in `order by` clause, some query can execute successfully, some query can trigger another internal error in sort logic. ``` > /*DML*/CREATE TABLE t1(v0 BOOLEAN); /*DML*/CREATE TABLE t3(v0 BOOLEAN, v1 BIGINT); 0 row(s) fetched. Elapsed 0.058 seconds. 0 row(s) fetched. Elapsed 0.002 seconds. > SELECT * FROM t3 NATURAL JOIN t1 ORDER BY (0.7 | 0.8); +----+----+ | v1 | v0 | +----+----+ +----+----+ 0 row(s) fetched. Elapsed 0.084 seconds. > SELECT * FROM t3 NATURAL JOIN t1 ORDER BY (0.7 | 0.8) > 0; Internal error: Sort expressions cannot be empty for streaming merge. 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 ``` ### Expected behavior _No response_ ### Additional context Found by SQLancer https://github.com/apache/datafusion/issues/11030 -- 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: github-unsubscr...@datafusion.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org