Open dwenking opened 5 days ago
Interesting. Returns no results when c0
includes nan
and c0 is in the ORDER BY
:
CREATE TABLE t0 (c0 Float32) ENGINE MergeTree() ORDER BY c0;
INSERT INTO t0 VALUES (1), (2), (nan);
SELECT * FROM t0 WHERE c0 != 1;
0 rows in set. Elapsed: 0.008 sec.
Result as expected when no order key specified:
CREATE TABLE t0 (c0 Float32) ENGINE MergeTree() ORDER BY ();
INSERT INTO t0 VALUES (1), (2), (nan);
SELECT * FROM t0 WHERE c0 != 1;
┌──c0─┐
1. │ 2 │
2. │ nan │
└─────┘
2 rows in set. Elapsed: 0.006 sec.
Result as expected when nan
not present:
CREATE TABLE t0 (c0 Float32) ENGINE MergeTree() ORDER BY c0;
INSERT INTO t0 VALUES (1), (2);
SELECT * FROM t0 WHERE c0 != 1;
┌─c0─┐
1. │ 2 │
└────┘
1 row in set. Elapsed: 0.003 sec.
Company or project name
WingTecher Lab
Describe what's wrong
When filtering with a condition
c0 != -8.0324759543107315e+37
, no rows are returned even though c0 contains NaN, which should not equal any numeric value.How to reproduce
Environment:
Test case:
Set up:
Execute this SELECT:
Expected behavior
The query should return the row
(NaN, 7583471)
fromt1
.