Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add function get_query_dump #48105

Merged
merged 2 commits into from
Jul 11, 2024

s

feec785
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

[Feature] Add function get_query_dump #48105

s
feec785
Select commit
Loading
Failed to load commit list.
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

See this annotation in the file changed.

@github-actions 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_810dfaca27d049ff9490b74ed1c8da27' and `DEFINITION` like "%test_iceberg_mv0_810dfaca27d049ff9490b74ed1c8da27%";
- [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_810dfaca27d049ff9490b74ed1c8da27' and `DEFINITION` like "%test_iceberg_mv0_810dfaca27d049ff9490b74ed1c8da27%";
- [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_810dfaca27d049ff9490b74ed1c8da27', 'db_810dfaca27d049ff9490b74ed1c8da27']
[case resource: ]:  []
[SQL]: create external catalog mv_iceberg_810dfaca27d049ff9490b74ed1c8da27
properties
(
    "type" = "iceberg",
    "iceberg.catalog.type" = "hive",
    "hive.metastore.uris" = "thrift://172.20.190.199:9083"
);
[SQL]: set catalog mv_iceberg_810dfaca27d049ff9490b74ed1c8da27;
[SQL]: create database mv_ice_db_810dfaca27d049ff9490b74ed1c8da27;
[SQL]: use mv_ice_db_810dfaca27d049ff9490b74ed1c8da27;
[SQL]: create table mv_ice_tbl_810dfaca27d049ff9490b74ed1c8da27 (
  col_str string,
  col_int int,
  dt date
) partition by(dt);
[SQL]: insert into mv_ice_tbl_810dfaca27d049ff9490b74ed1c8da27 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_810dfaca27d049ff9490b74ed1c8da27;
[SQL]: use db_810dfaca27d049ff9490b74ed1c8da27;
[SQL]: CREATE MATERIALIZED VIEW test_iceberg_mv0_810dfaca27d049ff9490b74ed1c8da27 PARTITION BY dt 
REFRESH DEFERRED MANUAL 
properties (
    "replication_num" = "1",
    "partition_refresh_number" = "1"
)
AS SELECT dt,sum(col_int) 
FROM mv_iceberg_810dfaca27d049ff9490b74ed1c8da27.mv_ice_db_810dfaca27d049ff9490b74ed1c8da27.mv_ice_tbl_810dfaca27d049ff9490b74ed1c8da27  GROUP BY dt;
[SQL]: refresh materialized view test_iceberg_mv0_810dfaca27d049ff9490b74ed1c8da27;
[FUNCTION]: wait_async_materialized_view_finish("db_810dfaca27d049ff9490b74ed1c8da27", "test_iceberg_mv0_810dfaca27d049ff9490b74ed1c8da27", 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_810dfaca27d049ff9490b74ed1c8da27' and a.`database`='db_810dfaca27d049ff9490b74ed1c8da27'
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_810dfaca27d049ff9490b74ed1c8da27' and a.`database`='db_810dfaca27d049ff9490b74ed1c8da27'
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_810dfaca27d049ff9490b74ed1c8da27' and a.`database`='db_810dfaca27d049ff9490b74ed1c8da27'
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_810dfaca27d049ff9490b74ed1c8da27' and a.`database`='db_810dfaca27d049ff9490b74ed1c8da27'
[SQL]: select count(*) from information_schema.task_runs where `database`='db_810dfaca27d049ff9490b74ed1c8da27' and `DEFINITION` like "%test_iceberg_mv0_810dfaca27d049ff9490b74ed1c8da27%";