You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/10/17 01:08:38 UTC

[doris] branch master updated: [fix](regression-test) fix that multiple cases conflict with the same table name (#13395)

This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 2da7fe940c [fix](regression-test) fix that multiple cases conflict with the same table name (#13395)
2da7fe940c is described below

commit 2da7fe940c5c7f46de8a88ca87ba1787edfbef5a
Author: Xin Liao <li...@126.com>
AuthorDate: Mon Oct 17 09:08:30 2022 +0800

    [fix](regression-test) fix that multiple cases conflict with the same table name (#13395)
---
 .../suites/correctness/test_pushdown_pred_to_view.groovy | 16 ++++++++++------
 .../suites/correctness/test_view_varchar_length.groovy   | 14 ++++++++++----
 2 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/regression-test/suites/correctness/test_pushdown_pred_to_view.groovy b/regression-test/suites/correctness/test_pushdown_pred_to_view.groovy
index 41afda7351..3cf285b2fd 100644
--- a/regression-test/suites/correctness/test_pushdown_pred_to_view.groovy
+++ b/regression-test/suites/correctness/test_pushdown_pred_to_view.groovy
@@ -28,9 +28,11 @@ The bug is we cannot resolve v1.id in context of the expanded sql.
 The same resolve error occurs when re-analyze v2.
 */
  suite("test_pushdown_pred_to_view") {
-     sql """ DROP TABLE IF EXISTS T """
+     def tableName = "t_pushdown_pred_to_view";
+     def viewName = "v_pushdown_pred_to_view";
+     sql """ DROP TABLE IF EXISTS ${tableName} """
      sql """
-         CREATE TABLE `T` (
+         CREATE TABLE ${tableName} (
              `id` int
          ) ENGINE=OLAP
          AGGREGATE KEY(`id`)
@@ -42,17 +44,19 @@ The same resolve error occurs when re-analyze v2.
              "storage_format" = "V2"
          );
      """
-     sql "drop view if exists V;"
+     sql "drop view if exists ${viewName};"
      sql """
-         create view V as select * from T where id > 0;
+         create view ${viewName} as select * from ${tableName} where id > 0;
      """
 
      sql """
-         insert into T values(1);
+         insert into ${tableName} values(1);
      """
 
      qt_sql """
-         select * from V as v1 join V as v2 on v1.id=v2.id and v1.id>0;
+         select * from ${viewName} as v1 join ${viewName} as v2 on v1.id=v2.id and v1.id>0;
      """
+     sql "DROP VIEW ${viewName}"
+     sql "DROP TABLE ${tableName}"
  }
 
diff --git a/regression-test/suites/correctness/test_view_varchar_length.groovy b/regression-test/suites/correctness/test_view_varchar_length.groovy
index 992be1d672..ff5cdc63c6 100644
--- a/regression-test/suites/correctness/test_view_varchar_length.groovy
+++ b/regression-test/suites/correctness/test_view_varchar_length.groovy
@@ -22,9 +22,12 @@ Expect: varchar(32)
 Type before bug fix: varchar(*)
 */
  suite("test_view_varchar_length") {
-     sql """ DROP TABLE IF EXISTS T """
+     def tableName = "t_view_varchar_length";
+     def viewName = "v_test_view_varchar_length";
+
+     sql """ DROP TABLE IF EXISTS ${tableName} """
      sql """
-         CREATE TABLE `t_test_view_varchar_length` (
+         CREATE TABLE ${tableName} (
              `id` int,
              `name` varchar(32) 
          ) ENGINE=OLAP
@@ -36,13 +39,16 @@ Type before bug fix: varchar(*)
              "storage_format" = "V2"
          );
      """
-     sql "drop view if exists v_test_view_varchar_length;"
+     sql "drop view if exists ${viewName};"
      sql """
-         create view v_test_view_varchar_length as select name from t_test_view_varchar_length;
+         create view ${viewName} as select name from ${tableName};
      """
 
      qt_sql """
          desc v_test_view_varchar_length;
      """
+
+     sql "DROP VIEW ${viewName}"
+     sql "DROP TABLE ${tableName}"
  }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org