Skip to content

Commit

Permalink
Merge pull request ClickHouse#65271 from ClickHouse/add-test-conditio…
Browse files Browse the repository at this point in the history
…n-pushdown

Add a test just in case
  • Loading branch information
alexey-milovidov authored Jun 14, 2024
2 parents 8f85d53 + 67c41d0 commit 905495e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/queries/0_stateless/03171_condition_pushdown.reference
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
123 123
456 456
6 changes: 6 additions & 0 deletions tests/queries/0_stateless/03171_condition_pushdown.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-- This query succeeds only if it is correctly optimized.
SET allow_experimental_analyzer = 1;
SELECT * FROM (SELECT * FROM numbers(1e19)) AS t1, (SELECT * FROM numbers(1e19)) AS t2 WHERE t1.number IN (123, 456) AND t2.number = t1.number ORDER BY ALL;

-- Still TODO:
-- SELECT * FROM (SELECT * FROM numbers(1e19)) AS t1, (SELECT * FROM numbers(1e19)) AS t2 WHERE t1.number IN (SELECT 123 UNION ALL SELECT 456) AND t2.number = t1.number ORDER BY ALL;

0 comments on commit 905495e

Please sign in to comment.