[Feature] Trino dialect, the extract function supports dow and week p… #11
GitHub Actions / SQL-Tester Report (Release ubuntu)
failed
Nov 19, 2024 in 0s
843 tests run, 842 passed, 0 skipped, 1 failed.
Annotations
Check failure on line 1 in TestSQLCases
github-actions / SQL-Tester Report (Release ubuntu)
TestSQLCases.test_mv_partition_union_rewrite_mode_iceberg
True is not false : assert expect test_mv1 should not be found
Raw output
[Stacktrace]:
Traceback (most recent call last):
File "/root/.pyenv/versions/3.8.19/lib/python3.8/unittest/case.py", line 60, in testPartExecutor
yield
File "/root/.pyenv/versions/3.8.19/lib/python3.8/unittest/case.py", line 676, in run
self._callTestMethod(testMethod)
File "/root/.pyenv/versions/3.8.19/lib/python3.8/unittest/case.py", line 633, in _callTestMethod
method()
File "/root/.pyenv/versions/3.8.19/lib/python3.8/site-packages/nose/case.py", line 170, in runTest
self.test(*self.arg)
File "/root/.pyenv/versions/3.8.19/lib/python3.8/site-packages/parameterized/parameterized.py", line 620, in standalone_func
return func(*(a + p.args), **p.kwargs, **kw)
File "/home/runner/_work/starrocks/starrocks/test/lib/sql_annotation.py", line 48, in wrapper
raise e
File "/home/runner/_work/starrocks/starrocks/test/lib/sql_annotation.py", line 43, in wrapper
res = func(*args, **kwargs)
File "/home/runner/_work/starrocks/starrocks/test/test_sql_cases.py", line 370, in test_sql_basic
actual_res, actual_res_log, var, order = self.execute_single_statement(sql, sql_id, record_mode)
File "/home/runner/_work/starrocks/starrocks/test/lib/sr_sql_lib.py", line 1237, in execute_single_statement
actual_res = eval("self.%s" % sql)
File "<string>", line 1, in <module>
File "/home/runner/_work/starrocks/starrocks/test/lib/sr_sql_lib.py", line 2081, in check_no_hit_materialized_view
tools.assert_false(str(res["result"]).find(expect) > 0, "assert expect %s should not be found" % (expect))
File "/root/.pyenv/versions/3.8.19/lib/python3.8/unittest/case.py", line 759, in assertFalse
raise self.failureException(msg)
AssertionError: True is not false : assert expect test_mv1 should not be found
[Standard Output]:
?[1;32m------------------------------------------------------------ ?[0m
?[1;32m[case name]: test_mv_partition_union_rewrite_mode_iceberg ?[0m
?[1;32m[case file]: sql/test_materialized_view/R/test_mv_partition_union_rewrite_mode_iceberg ?[0m
?[1;32m------------------------------------------------------------ ?[0m
→ case db: ['mv_ice_db_6c6aeb4641e9477889676242cdfe840d', 'db_6c6aeb4641e9477889676242cdfe840d']
→ case resource: []
create external catalog mv_iceberg_6c6aeb4641e9477889676242cdfe840d
properties
(
"type" = "iceberg",
"iceberg.catalog.type" = "hive",
"hive.metastore.uris" = "thrift://172.20.190.199:9083"
);
set new_planner_optimize_timeout=10000;
set enable_materialized_view_transparent_union_rewrite = true;
set catalog mv_iceberg_6c6aeb4641e9477889676242cdfe840d;
create database mv_ice_db_6c6aeb4641e9477889676242cdfe840d;
use mv_ice_db_6c6aeb4641e9477889676242cdfe840d;
CREATE TABLE t1 (
num int,
dt date
)
PARTITION BY (dt);
INSERT INTO t1 VALUES
(1,"2020-06-15"),(2,"2020-06-18"),(3,"2020-06-21"),(4,"2020-06-24"),
(1,"2020-07-02"),(2,"2020-07-05"),(3,"2020-07-08"),(4,"2020-07-11"),
(1,"2020-07-16"),(2,"2020-07-19"),(3,"2020-07-22"),(4,"2020-07-25"),
(2,"2020-06-15"),(3,"2020-06-18"),(4,"2020-06-21"),(5,"2020-06-24"),
(2,"2020-07-02"),(3,"2020-07-05"),(4,"2020-07-08"),(5,"2020-07-11");
CREATE TABLE t2 (
num int,
dt string
)
PARTITION BY (dt);
INSERT INTO t2 VALUES
(1,"2020-06-15"),(2,"2020-06-18"),(3,"2020-06-21"),(4,"2020-06-24"),
(1,"2020-07-02"),(2,"2020-07-05"),(3,"2020-07-08"),(4,"2020-07-11"),
(1,"2020-07-16"),(2,"2020-07-19"),(3,"2020-07-22"),(4,"2020-07-25"),
(2,"2020-06-15"),(3,"2020-06-18"),(4,"2020-06-21"),(5,"2020-06-24"),
(2,"2020-07-02"),(3,"2020-07-05"),(4,"2020-07-08"),(5,"2020-07-11");
set catalog default_catalog;
create database db_6c6aeb4641e9477889676242cdfe840d;
use db_6c6aeb4641e9477889676242cdfe840d;
CREATE MATERIALIZED VIEW test_mv1
PARTITION BY dt
REFRESH DEFERRED MANUAL AS
SELECT dt,sum(num) FROM mv_iceberg_6c6aeb4641e9477889676242cdfe840d.mv_ice_db_6c6aeb4641e9477889676242cdfe840d.t1 GROUP BY dt;
REFRESH MATERIALIZED VIEW test_mv1 WITH SYNC MODE;
[FUNCTION]: check_hit_materialized_view("SELECT dt,sum(num) FROM mv_iceberg_6c6aeb4641e9477889676242cdfe840d.mv_ice_db_6c6aeb4641e9477889676242cdfe840d.t1 where dt='2020-06-15' GROUP BY dt;", "test_mv1")
[FUNCTION]: check_hit_materialized_view("SELECT dt,sum(num) FROM mv_iceberg_6c6aeb4641e9477889676242cdfe840d.mv_ice_db_6c6aeb4641e9477889676242cdfe840d.t1 where dt !='2020-06-15' GROUP BY dt;", "test_mv1")
[FUNCTION]: check_hit_materialized_view("SELECT dt,sum(num) FROM mv_iceberg_6c6aeb4641e9477889676242cdfe840d.mv_ice_db_6c6aeb4641e9477889676242cdfe840d.t1 where dt>='2020-06-15' GROUP BY dt;", "test_mv1")
[FUNCTION]: check_hit_materialized_view("SELECT dt,sum(num) FROM mv_iceberg_6c6aeb4641e9477889676242cdfe840d.mv_ice_db_6c6aeb4641e9477889676242cdfe840d.t1 where dt>'2020-06-15' GROUP BY dt;", "test_mv1")
[FUNCTION]: check_hit_materialized_view("SELECT dt,sum(num) FROM mv_iceberg_6c6aeb4641e9477889676242cdfe840d.mv_ice_db_6c6aeb4641e9477889676242cdfe840d.t1 where dt>'2020-06-15' and dt < '2020-07-22' GROUP BY dt;", "test_mv1")
[FUNCTION]: check_hit_materialized_view("SELECT dt,sum(num) FROM mv_iceberg_6c6aeb4641e9477889676242cdfe840d.mv_ice_db_6c6aeb4641e9477889676242cdfe840d.t1 where dt>'2020-06-15' and dt <= '2020-07-22' GROUP BY dt;", "test_mv1")
[FUNCTION]: check_hit_materialized_view("SELECT dt,sum(num) FROM mv_iceberg_6c6aeb4641e9477889676242cdfe840d.mv_ice_db_6c6aeb4641e9477889676242cdfe840d.t1 where (dt>'2020-06-15' and dt <= '2020-06-22') or dt>'2020-07-01' GROUP BY dt;", "test_mv1")
[FUNCTION]: check_hit_materialized_view("SELECT dt,sum(num) FROM mv_iceberg_6c6aeb4641e9477889676242cdfe840d.mv_ice_db_6c6aeb4641e9477889676242cdfe840d.t1 where dt in ('2020-06-15', '2020-06-22', '2020-07-01') GROUP BY dt;", "test_mv1")
[FUNCTION]: check_hit_materialized_view("SELECT dt,sum(num) FROM mv_iceberg_6c6aeb4641e9477889676242cdfe840d.mv_ice_db_6c6aeb4641e9477889676242cdfe840d.t1 where date_trunc('day', dt) ='2020-06-15' GROUP BY dt;", "test_mv1")
[FUNCTION]: check_hit_materialized_view("SELECT dt,sum(num) FROM mv_iceberg_6c6aeb4641e9477889676242cdfe840d.mv_ice_db_6c6aeb4641e9477889676242cdfe840d.t1 where date_trunc('month', dt) ='2020-06-01' GROUP BY dt;", "test_mv1")
[FUNCTION]: check_hit_materialized_view("SELECT dt,sum(num) FROM mv_iceberg_6c6aeb4641e9477889676242cdfe840d.mv_ice_db_6c6aeb4641e9477889676242cdfe840d.t1 where date_trunc('month', dt) ='2020-07-01' GROUP BY dt;", "test_mv1")
[FUNCTION]: check_hit_materialized_view("SELECT dt,sum(num) FROM mv_iceberg_6c6aeb4641e9477889676242cdfe840d.mv_ice_db_6c6aeb4641e9477889676242cdfe840d.t1 GROUP BY dt;", "test_mv1")
SELECT dt,sum(num) FROM mv_iceberg_6c6aeb4641e9477889676242cdfe840d.mv_ice_db_6c6aeb4641e9477889676242cdfe840d.t1 where dt='2020-06-15' GROUP BY dt order by dt;
SELECT dt,sum(num) FROM mv_iceberg_6c6aeb4641e9477889676242cdfe840d.mv_ice_db_6c6aeb4641e9477889676242cdfe840d.t1 where dt !='2020-06-15' GROUP BY dt order by dt;
SELECT dt,sum(num) FROM mv_iceberg_6c6aeb4641e9477889676242cdfe840d.mv_ice_db_6c6aeb4641e9477889676242cdfe840d.t1 where dt>='2020-06-15' GROUP BY dt order by dt;
SELECT dt,sum(num) FROM mv_iceberg_6c6aeb4641e9477889676242cdfe840d.mv_ice_db_6c6aeb4641e9477889676242cdfe840d.t1 where dt>'2020-06-15' GROUP BY dt order by dt;
SELECT dt,sum(num) FROM mv_iceberg_6c6aeb4641e9477889676242cdfe840d.mv_ice_db_6c6aeb4641e9477889676242cdfe840d.t1 where dt>'2020-06-15' and dt < '2020-07-22' GROUP BY dt order by dt;
SELECT dt,sum(num) FROM mv_iceberg_6c6aeb4641e9477889676242cdfe840d.mv_ice_db_6c6aeb4641e9477889676242cdfe840d.t1 where dt>'2020-06-15' and dt <= '2020-07-22' GROUP BY dt order by dt;
SELECT dt,sum(num) FROM mv_iceberg_6c6aeb4641e9477889676242cdfe840d.mv_ice_db_6c6aeb4641e9477889676242cdfe840d.t1 where (dt>'2020-06-15' and dt <= '2020-06-22') or dt>'2020-07-01' GROUP BY dt order by dt;
SELECT dt,sum(num) FROM mv_iceberg_6c6aeb4641e9477889676242cdfe840d.mv_ice_db_6c6aeb4641e9477889676242cdfe840d.t1 where dt in ('2020-06-15', '2020-06-22', '2020-07-01') GROUP BY dt order by dt;
SELECT dt,sum(num) FROM mv_iceberg_6c6aeb4641e9477889676242cdfe840d.mv_ice_db_6c6aeb4641e9477889676242cdfe840d.t1 where date_trunc('day', dt) ='2020-06-15' GROUP BY dt order by dt;
SELECT dt,sum(num) FROM mv_iceberg_6c6aeb4641e9477889676242cdfe840d.mv_ice_db_6c6aeb4641e9477889676242cdfe840d.t1 where date_trunc('month', dt) ='2020-06-01' GROUP BY dt order by dt;
SELECT dt,sum(num) FROM mv_iceberg_6c6aeb4641e9477889676242cdfe840d.mv_ice_db_6c6aeb4641e9477889676242cdfe840d.t1 where date_trunc('month', dt) ='2020-07-01' GROUP BY dt order by dt;
SELECT dt,sum(num) FROM mv_iceberg_6c6aeb4641e9477889676242cdfe840d.mv_ice_db_6c6aeb4641e9477889676242cdfe840d.t1 GROUP BY dt order by dt;
INSERT INTO mv_iceberg_6c6aeb4641e9477889676242cdfe840d.mv_ice_db_6c6aeb4641e9477889676242cdfe840d.t1 VALUES (3, "2020-06-15");
[FUNCTION]: check_no_hit_materialized_view("SELECT dt,sum(num) FROM mv_iceberg_6c6aeb4641e9477889676242cdfe840d.mv_ice_db_6c6aeb4641e9477889676242cdfe840d.t1 where dt='2020-06-15' GROUP BY dt;", "test_mv1")
?[1;32m******************** [FINISH] test_mv_partition_union_rewrite_mode_iceberg ******************** ?[0m
Loading