You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PostgreSQL treats NaN values as equal, and greater than all non- NaN values which is different from how Trino treats NaN. So if the underlying PG tables has NaN as a part of its data - the comparison operator i.e > 1 or > Infinity() which is pushed down via TupleDomain and ConnectorExpression returns invalid result.
trino:public> set session allow_pushdown_into_connectors=true;
SET SESSION
trino:public> select * from temp2 where c_real > REAL 'Infinity';
c_int | c_real | c_double
-------+--------+----------
1 | NaN | NaN
(1 row)
trino:public> set session allow_pushdown_into_connectors=false;
SET SESSION
trino:public> select * from temp2 where c_real > REAL 'Infinity';
c_int | c_real | c_double
-------+--------+----------
(0 rows)
PostgreSQL treats NaN values as equal, and greater than all non- NaN values which is different from how Trino treats NaN. So if the underlying PG tables has
NaN
as a part of its data - the comparison operator i.e > 1 or > Infinity() which is pushed down viaTupleDomain
andConnectorExpression
returns invalid result.trino:public> set session allow_pushdown_into_connectors=true;
SET SESSION
trino:public> select * from temp2 where c_real > REAL 'Infinity';
c_int | c_real | c_double
-------+--------+----------
1 | NaN | NaN
(1 row)
Query 20240510_124319_00043_pnw65, FINISHED, 1 node
Splits: 1 total, 1 done (100.00%)
0.23 [1 rows, 0B] [4 rows/s, 0B/s]
trino:public> set session allow_pushdown_into_connectors=false;
SET SESSION
trino:public> select * from temp2 where c_real > REAL 'Infinity';
c_int | c_real | c_double
-------+--------+----------
(0 rows)
Query 20240510_124323_00045_pnw65, FINISHED, 1 node
Splits: 1 total, 1 done (100.00%)
0.06 [3 rows, 0B] [47 rows/s, 0B/s]
The text was updated successfully, but these errors were encountered: