mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-19 16:20:50 +00:00
Compare functions NaN update test (#50366)
Co-authored-by: Nikita Mikhaylov <mikhaylovnikitka@gmail.com>
This commit is contained in:
parent
4d4112ff53
commit
2efebee5a3
@ -8,3 +8,4 @@ nan 1 1 1 1
|
||||
nan nan 1 1 1 1
|
||||
--
|
||||
nan
|
||||
--
|
@ -7,11 +7,13 @@ SELECT nan AS lhs, cast(nan, 'Float32') AS rhs, lhs = rhs, lhs = materialize(rhs
|
||||
|
||||
SELECT '--';
|
||||
|
||||
DROP TABLE IF EXISTS test_table;
|
||||
CREATE TABLE test_table
|
||||
(
|
||||
id UInt32,
|
||||
value UInt32
|
||||
) ENGINE = MergeTree ORDER BY id;
|
||||
|
||||
INSERT INTO test_table VALUES (76, 57);
|
||||
|
||||
SELECT value FROM (SELECT stddevSamp(id) AS value FROM test_table) as subquery
|
||||
@ -33,6 +35,7 @@ CREATE TABLE test_table
|
||||
value_1 UInt32,
|
||||
value_2 Float32
|
||||
) ENGINE = MergeTree ORDER BY id;
|
||||
|
||||
INSERT INTO test_table VALUES (12000, 36, 77.94);
|
||||
|
||||
SELECT value
|
||||
@ -40,3 +43,18 @@ FROM (SELECT (corr(value_1, value_1) OVER test_window) AS value FROM test_table
|
||||
WHERE not (not (value <> value));
|
||||
|
||||
DROP TABLE test_table;
|
||||
|
||||
SELECT '--';
|
||||
|
||||
CREATE TABLE test_table
|
||||
(
|
||||
id Float32,
|
||||
value Float32
|
||||
) ENGINE=MergeTree ORDER BY id;
|
||||
|
||||
INSERT INTO test_table VALUES (-10.75, 95.57);
|
||||
|
||||
SELECT * FROM (SELECT corr(id, id) as corr_value FROM test_table GROUP BY value) AS subquery LEFT ANTI JOIN test_table ON (subquery.corr_value = test_table.id)
|
||||
WHERE (test_table.id >= test_table.id) AND (NOT (test_table.id >= test_table.id));
|
||||
|
||||
DROP TABLE test_table;
|
Loading…
Reference in New Issue
Block a user