You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: regression-test/suites/view_p0/view_p0.groovy
+28
Original file line number
Diff line number
Diff line change
@@ -136,4 +136,32 @@ suite("view_p0") {
136
136
sql """CREATE VIEW IF NOT EXISTS `test_view_abc`(`a`) AS WITH T1 AS (SELECT 1 AS 'a'), T2 AS (SELECT 2 AS 'a') SELECT T1.a FROM T1 UNION ALL SELECT T2.a FROM T2;"""
137
137
138
138
sql "drop view if exists test_view_abc;"
139
+
140
+
sql """DROP TABLE IF EXISTS test_view_table2"""
141
+
142
+
sql """
143
+
CREATE TABLE test_view_table2 (
144
+
c_date varchar(50)
145
+
)
146
+
ENGINE=OLAP
147
+
UNIQUE KEY(`c_date`)
148
+
distributed by hash(c_date) properties('replication_num'='1');
149
+
"""
150
+
151
+
sql """ drop view if exists test_view_table2_view;"""
152
+
sql """CREATE VIEW `test_view_table2_view`
153
+
AS
154
+
SELECT
155
+
date_format(c_date,'%Y-%m-%d') AS `CREATE_DATE`
156
+
FROM
157
+
test_view_table2
158
+
GROUP BY
159
+
date_format(c_date, '%Y-%m-%d');
160
+
"""
161
+
sql """set enable_nereids_planner=false;"""
162
+
sql """select * from test_view_table2_view;"""
163
+
sql """set enable_nereids_planner=true;"""
164
+
sql """select * from test_view_table2_view;"""
165
+
sql """ drop view if exists test_view_table2_view;"""
0 commit comments