mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Added jit if test
This commit is contained in:
parent
050cb74ed0
commit
57d5f55d7f
7
tests/queries/0_stateless/01852_jit_if.reference
Normal file
7
tests/queries/0_stateless/01852_jit_if.reference
Normal file
@ -0,0 +1,7 @@
|
||||
test_jit_nonnull
|
||||
0 0 0
|
||||
1 2 1
|
||||
test_jit_nullable
|
||||
0 0 0
|
||||
1 2 1
|
||||
\N 0 0
|
16
tests/queries/0_stateless/01852_jit_if.sql
Normal file
16
tests/queries/0_stateless/01852_jit_if.sql
Normal file
@ -0,0 +1,16 @@
|
||||
SET compile_expressions = 1;
|
||||
SET min_count_to_compile_expression = 0;
|
||||
|
||||
DROP TABLE IF EXISTS test_jit_nonnull;
|
||||
CREATE TABLE test_jit_nonnull (value UInt8) ENGINE = TinyLog;
|
||||
INSERT INTO test_jit_nonnull VALUES (0), (1);
|
||||
|
||||
SELECT 'test_jit_nonnull';
|
||||
SELECT value, multiIf(value = 1, 2, value, 1, 0), if (value, 1, 0) FROM test_jit_nonnull;
|
||||
|
||||
DROP TABLE IF EXISTS test_jit_nullable;
|
||||
CREATE TABLE test_jit_nullable (value Nullable(UInt8)) ENGINE = TinyLog;
|
||||
INSERT INTO test_jit_nullable VALUES (0), (1), (NULL);
|
||||
|
||||
SELECT 'test_jit_nullable';
|
||||
SELECT value, multiIf(value = 1, 2, value, 1, 0), if (value, 1, 0) FROM test_jit_nullable;
|
Loading…
Reference in New Issue
Block a user