[Feature] Add function get_query_dump #48105
Merged
GitHub Actions / SQL-Tester Report
failed
Jul 10, 2024 in 0s
682 tests run, 681 passed, 0 skipped, 1 failed.
Annotations
Check failure on line 1 in TestSQLCases
github-actions / SQL-Tester Report
TestSQLCases.test_create_mv_with_params
Element counts were not equal:
First has 1, Second has 0: '4'
First has 0, Second has 1: '3' : sql result not match:
- [SQL]: select count(*) from information_schema.task_runs where `database`='db_53c1c647e29b4e7084e687aa24f7146e' and `DEFINITION` like "%test_iceberg_mv0_53c1c647e29b4e7084e687aa24f7146e%";
- [exp]: ['4']
- [act]: ['3']
---
Raw output
[Stacktrace]:
Traceback (most recent call last):
File "/usr/lib/python3.7/unittest/case.py", line 59, in testPartExecutor
yield
File "/usr/lib/python3.7/unittest/case.py", line 615, in run
testMethod()
File "/usr/local/lib/python3.7/dist-packages/nose/case.py", line 198, in runTest
self.test(*self.arg)
File "/usr/local/lib/python3.7/dist-packages/parameterized/parameterized.py", line 620, in standalone_func
return func(*(a + p.args), **p.kwargs, **kw)
File "/home/runner/_work/starrocks/starrocks/test/test_sql_cases.py", line 271, in test_sql_basic
self.check(sql_id, sql, expect_res, actual_res, order, ori_sql)
File "/home/runner/_work/starrocks/starrocks/test/lib/sr_sql_lib.py", line 977, in check
exp, act, "sql result not match:\n- [SQL]: %s\n- [exp]: %s\n- [act]: %s\n---" % (sql, exp, act)
File "/usr/lib/python3.7/unittest/case.py", line 1200, in assertCountEqual
self.fail(msg)
File "/usr/lib/python3.7/unittest/case.py", line 680, in fail
raise self.failureException(msg)
AssertionError: Element counts were not equal:
First has 1, Second has 0: '4'
First has 0, Second has 1: '3' : sql result not match:
- [SQL]: select count(*) from information_schema.task_runs where `database`='db_53c1c647e29b4e7084e687aa24f7146e' and `DEFINITION` like "%test_iceberg_mv0_53c1c647e29b4e7084e687aa24f7146e%";
- [exp]: ['4']
- [act]: ['3']
---
[Standard Output]:
[case name]: test_create_mv_with_params
[case file]: sql/test_materialized_view/R/test_create_mv_with_params
[case db]: ['mv_ice_db_53c1c647e29b4e7084e687aa24f7146e', 'db_53c1c647e29b4e7084e687aa24f7146e']
[case resource: ]: []
[SQL]: create external catalog mv_iceberg_53c1c647e29b4e7084e687aa24f7146e
properties
(
"type" = "iceberg",
"iceberg.catalog.type" = "hive",
"hive.metastore.uris" = "thrift://172.20.190.199:9083"
);
[SQL]: set catalog mv_iceberg_53c1c647e29b4e7084e687aa24f7146e;
[SQL]: create database mv_ice_db_53c1c647e29b4e7084e687aa24f7146e;
[SQL]: use mv_ice_db_53c1c647e29b4e7084e687aa24f7146e;
[SQL]: create table mv_ice_tbl_53c1c647e29b4e7084e687aa24f7146e (
col_str string,
col_int int,
dt date
) partition by(dt);
[SQL]: insert into mv_ice_tbl_53c1c647e29b4e7084e687aa24f7146e values
('1d8cf2a2c0e14fa89d8117792be6eb6f', 2000, '2023-12-01'),
('3e82e36e56718dc4abc1168d21ec91ab', 2000, '2023-12-01'),
('abc', 2000, '2023-12-02'),
(NULL, 2000, '2023-12-02'),
('ab1d8cf2a2c0e14fa89d8117792be6eb6f', 2001, '2023-12-03'),
('3e82e36e56718dc4abc1168d21ec91ab', 2001, '2023-12-03'),
('abc', 2001, '2023-12-04'),
(NULL, 2001, '2023-12-04');
[SQL]: set catalog default_catalog;
[SQL]: create database db_53c1c647e29b4e7084e687aa24f7146e;
[SQL]: use db_53c1c647e29b4e7084e687aa24f7146e;
[SQL]: CREATE MATERIALIZED VIEW test_iceberg_mv0_53c1c647e29b4e7084e687aa24f7146e PARTITION BY dt
REFRESH DEFERRED MANUAL
properties (
"replication_num" = "1",
"partition_refresh_number" = "1"
)
AS SELECT dt,sum(col_int)
FROM mv_iceberg_53c1c647e29b4e7084e687aa24f7146e.mv_ice_db_53c1c647e29b4e7084e687aa24f7146e.mv_ice_tbl_53c1c647e29b4e7084e687aa24f7146e GROUP BY dt;
[SQL]: refresh materialized view test_iceberg_mv0_53c1c647e29b4e7084e687aa24f7146e;
[FUNCTION]: wait_async_materialized_view_finish("db_53c1c647e29b4e7084e687aa24f7146e", "test_iceberg_mv0_53c1c647e29b4e7084e687aa24f7146e", 4)
select STATE from information_schema.task_runs a join information_schema.materialized_views b on a.task_name=b.task_name where b.table_name='test_iceberg_mv0_53c1c647e29b4e7084e687aa24f7146e' and a.`database`='db_53c1c647e29b4e7084e687aa24f7146e'
select STATE from information_schema.task_runs a join information_schema.materialized_views b on a.task_name=b.task_name where b.table_name='test_iceberg_mv0_53c1c647e29b4e7084e687aa24f7146e' and a.`database`='db_53c1c647e29b4e7084e687aa24f7146e'
select STATE from information_schema.task_runs a join information_schema.materialized_views b on a.task_name=b.task_name where b.table_name='test_iceberg_mv0_53c1c647e29b4e7084e687aa24f7146e' and a.`database`='db_53c1c647e29b4e7084e687aa24f7146e'
select STATE from information_schema.task_runs a join information_schema.materialized_views b on a.task_name=b.task_name where b.table_name='test_iceberg_mv0_53c1c647e29b4e7084e687aa24f7146e' and a.`database`='db_53c1c647e29b4e7084e687aa24f7146e'
[SQL]: select count(*) from information_schema.task_runs where `database`='db_53c1c647e29b4e7084e687aa24f7146e' and `DEFINITION` like "%test_iceberg_mv0_53c1c647e29b4e7084e687aa24f7146e%";
Loading