forked from ClickHouse/ClickHouse
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ClickHouse#69676 from ClickHouse/hanfei/fix-create…
…-as-with-recursive fix bug about `CREATE ... AS WITH RECURSIVE`
- Loading branch information
Showing
3 changed files
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
10 changes: 10 additions & 0 deletions
10
tests/queries/0_stateless/03237_create_table_select_as_with_recursive.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
drop table if exists t; | ||
SET enable_analyzer = 1; | ||
create table t1 (a Int64, s DateTime('Asia/Istanbul')) Engine = MergeTree() ORDER BY a; | ||
create view t AS ( | ||
WITH RECURSIVE 42 as ttt, | ||
toDate(s) as start_date, | ||
_table as (select 1 as number union all select number + 1 from _table where number < 10) | ||
SELECT a, ttt from t1 join _table on t1.a = _table.number and start_date = '2024-09-23' | ||
); | ||
drop table t; |