2010YOUY01 opened a new issue, #11621:
URL: https://github.com/apache/datafusion/issues/11621
### Describe the bug
In the following reproducer, two rows in each table should first be joined,
then get evaluted to `true` by the predicate, and finally output to the final
result.
But the final result showed 0 rows output, it should be a logic bug.
(Verified in DuckDB and PostgreSQL)
### To Reproduce
Run in datafusion-cli
```
/*DML*/CREATE TABLE t1(v0 DOUBLE, v1 BOOLEAN, v2 STRING, v3 STRING);
/*DML*/CREATE TABLE t48(v0 DOUBLE, v1 STRING);
/*DML*/INSERT INTO t1(v3, v0) VALUES ('', '-Inf'::Double);
/*DML*/INSERT INTO t48(v1, v0) VALUES ('', '-Inf'::Double);
```
And the executed result
```
> SELECT * FROM t1 JOIN t48 ON ((t1.v0)=(t48.v0)) WHERE
((((t48.v0)==(t1.v0)))OR(t1.v1));
+----+----+----+----+----+----+
| v0 | v1 | v2 | v3 | v0 | v1 |
+----+----+----+----+----+----+
+----+----+----+----+----+----+
0 row(s) fetched.
Elapsed 0.041 seconds.
```
expected result should be 1 row output:
```
D SELECT * FROM t1 JOIN t48 ON ((t1.v0)=(t48.v0)) WHERE
((((t48.v0)==(t1.v0)))OR(t1.v1));
┌────────┬─────────┬─────────┬─────────┬────────┬─────────┐
│ v0 │ v1 │ v2 │ v3 │ v0 │ v1 │
│ double │ boolean │ varchar │ varchar │ double │ varchar │
├────────┼─────────┼─────────┼─────────┼────────┼─────────┤
│ -inf │ │ │ │ -inf │ │
└────────┴─────────┴─────────┴─────────┴────────┴─────────┘
```
### 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: [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]