You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2023/11/02 03:53:12 UTC
(doris) branch branch-2.0 updated: [branch-2.0][Fix](regression)fix case test_show_where (#26274)
This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new c73773a94c6 [branch-2.0][Fix](regression)fix case test_show_where (#26274)
c73773a94c6 is described below
commit c73773a94c6ebe5be76a64813bb1fe2e2b759dfe
Author: zhangguoqiang <18...@163.com>
AuthorDate: Thu Nov 2 11:53:06 2023 +0800
[branch-2.0][Fix](regression)fix case test_show_where (#26274)
fix case test_show_where
---
.../data/nereids_p0/show/test_show_where.out | 44 ++++++++++++++++++++++
.../data/query_p0/show/test_show_where.out | 44 ++++++++++++++++++++++
.../suites/nereids_p0/show/test_show_where.groovy | 23 ++++++-----
.../suites/query_p0/show/test_show_where.groovy | 23 ++++++-----
4 files changed, 116 insertions(+), 18 deletions(-)
diff --git a/regression-test/data/nereids_p0/show/test_show_where.out b/regression-test/data/nereids_p0/show/test_show_where.out
index 6e51af956fd..538d5c23ab3 100644
--- a/regression-test/data/nereids_p0/show/test_show_where.out
+++ b/regression-test/data/nereids_p0/show/test_show_where.out
@@ -17,3 +17,47 @@ ex_tb1
ex_tb0
ex_tb1
+-- !select --
+show_test_do_not_modify
+
+-- !select --
+ex_tb0
+ex_tb1
+ex_tb2
+
+-- !select --
+ex_tb0
+
+-- !select --
+ex_tb0
+ex_tb1
+ex_tb2
+
+-- !select --
+ex_tb0
+ex_tb1
+
+-- !select --
+ex_tb0
+ex_tb1
+ex_tb2
+
+-- !select --
+doris_test
+
+-- !select --
+ex_tb0
+ex_tb1
+
+-- !select --
+ex_tb1
+
+-- !select --
+ex_tb0
+ex_tb1
+
+-- !select --
+ex_tb0
+ex_tb1
+ex_tb2
+
diff --git a/regression-test/data/query_p0/show/test_show_where.out b/regression-test/data/query_p0/show/test_show_where.out
index 6e51af956fd..538d5c23ab3 100644
--- a/regression-test/data/query_p0/show/test_show_where.out
+++ b/regression-test/data/query_p0/show/test_show_where.out
@@ -17,3 +17,47 @@ ex_tb1
ex_tb0
ex_tb1
+-- !select --
+show_test_do_not_modify
+
+-- !select --
+ex_tb0
+ex_tb1
+ex_tb2
+
+-- !select --
+ex_tb0
+
+-- !select --
+ex_tb0
+ex_tb1
+ex_tb2
+
+-- !select --
+ex_tb0
+ex_tb1
+
+-- !select --
+ex_tb0
+ex_tb1
+ex_tb2
+
+-- !select --
+doris_test
+
+-- !select --
+ex_tb0
+ex_tb1
+
+-- !select --
+ex_tb1
+
+-- !select --
+ex_tb0
+ex_tb1
+
+-- !select --
+ex_tb0
+ex_tb1
+ex_tb2
+
diff --git a/regression-test/suites/nereids_p0/show/test_show_where.groovy b/regression-test/suites/nereids_p0/show/test_show_where.groovy
index 7f2d9b2e5d2..2caf494bf2f 100644
--- a/regression-test/suites/nereids_p0/show/test_show_where.groovy
+++ b/regression-test/suites/nereids_p0/show/test_show_where.groovy
@@ -16,13 +16,17 @@
// under the License.
-suite("test_show_where", "query") {
+suite("test_show_where", "query,external,mysql,external_docker,external_docker_mysql") {
sql "SET enable_nereids_planner=true"
sql "SET enable_fallback_to_original_planner=false"
String ex_db_name = "doris_test";
String ex_tb0 = "ex_tb0";
String ex_tb1 = "ex_tb1";
String catalog_name = "test_show_where_mysql_jdbc_catalog";
+ String externalEnvIp = context.config.otherConfigs.get("externalEnvIp")
+ String s3_endpoint = getS3Endpoint()
+ String bucket = getS3BucketName()
+ String driver_url = "https://${bucket}.${s3_endpoint}/regression/jdbc_driver/mysql-connector-java-8.0.25.jar"
try {
sql """ drop database if exists ${ex_db_name} """
sql """ create database ${ex_db_name} """
@@ -54,7 +58,8 @@ suite("test_show_where", "query") {
String enabled = context.config.otherConfigs.get("enableJdbcTest")
String mysql_port = context.config.otherConfigs.get("mysql_57_port");
if (enabled != null && enabled.equalsIgnoreCase("true")) {
-
+ String mysql_show_db="show_test_do_not_modify"
+
sql """drop catalog if exists ${catalog_name} """
// if use 'com.mysql.cj.jdbc.Driver' here, it will report: ClassNotFound
@@ -62,20 +67,20 @@ suite("test_show_where", "query") {
"type"="jdbc",
"jdbc.user"="root",
"jdbc.password"="123456",
- "jdbc.jdbc_url" = "jdbc:mysql://127.0.0.1:${mysql_port}/doris_test?useSSL=false",
- "jdbc.driver_url" = "https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/jdbc_driver/mysql-connector-java-8.0.25.jar",
+ "jdbc.jdbc_url" = "jdbc:mysql://${externalEnvIp}:${mysql_port}/show_test_do_not_modify?useSSL=false",
+ "jdbc.driver_url" = "${driver_url}",
"jdbc.driver_class" = "com.mysql.cj.jdbc.Driver");
"""
sql """switch ${catalog_name}"""
- sql """ use ${ex_db_name}"""
+ sql """ use ${mysql_show_db}"""
- qt_select "show databases where schema_name= '${ex_db_name}'"
+ qt_select "show databases where schema_name= '${mysql_show_db}'"
qt_select "show tables"
qt_select "show tables where table_name= '${ex_tb0}'"
- qt_select "show tables from ${ex_db_name}"
+ qt_select "show tables from ${mysql_show_db}"
qt_select "show tables from internal.${ex_db_name}"
- qt_select "show tables from ${catalog_name}.${ex_db_name}"
+ qt_select "show tables from ${catalog_name}.${mysql_show_db}"
sql """switch internal"""
@@ -85,7 +90,7 @@ suite("test_show_where", "query") {
qt_select "show tables"
qt_select "show tables where table_name= '${ex_tb1}'"
qt_select "show tables from internal.${ex_db_name}"
- qt_select "show tables from ${catalog_name}.${ex_db_name}"
+ qt_select "show tables from ${catalog_name}.${mysql_show_db}"
}
diff --git a/regression-test/suites/query_p0/show/test_show_where.groovy b/regression-test/suites/query_p0/show/test_show_where.groovy
index 921722d89b6..1a48f5c926a 100644
--- a/regression-test/suites/query_p0/show/test_show_where.groovy
+++ b/regression-test/suites/query_p0/show/test_show_where.groovy
@@ -16,11 +16,15 @@
// under the License.
-suite("test_show_where", "query") {
+suite("test_show_where", "query,external,mysql,external_docker,external_docker_mysql") {
String ex_db_name = "doris_test";
String ex_tb0 = "ex_tb0";
String ex_tb1 = "ex_tb1";
String catalog_name = "test_show_where_mysql_jdbc_catalog";
+ String externalEnvIp = context.config.otherConfigs.get("externalEnvIp")
+ String s3_endpoint = getS3Endpoint()
+ String bucket = getS3BucketName()
+ String driver_url = "https://${bucket}.${s3_endpoint}/regression/jdbc_driver/mysql-connector-java-8.0.25.jar"
try {
sql """ drop database if exists ${ex_db_name} """
sql """ create database ${ex_db_name} """
@@ -52,7 +56,8 @@ suite("test_show_where", "query") {
String enabled = context.config.otherConfigs.get("enableJdbcTest")
String mysql_port = context.config.otherConfigs.get("mysql_57_port");
if (enabled != null && enabled.equalsIgnoreCase("true")) {
-
+ String mysql_show_db="show_test_do_not_modify"
+
sql """drop catalog if exists ${catalog_name} """
// if use 'com.mysql.cj.jdbc.Driver' here, it will report: ClassNotFound
@@ -60,20 +65,20 @@ suite("test_show_where", "query") {
"type"="jdbc",
"jdbc.user"="root",
"jdbc.password"="123456",
- "jdbc.jdbc_url" = "jdbc:mysql://127.0.0.1:${mysql_port}/doris_test?useSSL=false",
- "jdbc.driver_url" = "https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/jdbc_driver/mysql-connector-java-8.0.25.jar",
+ "jdbc.jdbc_url" = "jdbc:mysql://${externalEnvIp}:${mysql_port}/show_test_do_not_modify?useSSL=false",
+ "jdbc.driver_url" = "${driver_url}",
"jdbc.driver_class" = "com.mysql.cj.jdbc.Driver");
"""
sql """switch ${catalog_name}"""
- sql """ use ${ex_db_name}"""
+ sql """ use ${mysql_show_db}"""
- qt_select "show databases where schema_name= '${ex_db_name}'"
+ qt_select "show databases where schema_name= '${mysql_show_db}'"
qt_select "show tables"
qt_select "show tables where table_name= '${ex_tb0}'"
- qt_select "show tables from ${ex_db_name}"
+ qt_select "show tables from ${mysql_show_db}"
qt_select "show tables from internal.${ex_db_name}"
- qt_select "show tables from ${catalog_name}.${ex_db_name}"
+ qt_select "show tables from ${catalog_name}.${mysql_show_db}"
sql """switch internal"""
@@ -83,7 +88,7 @@ suite("test_show_where", "query") {
qt_select "show tables"
qt_select "show tables where table_name= '${ex_tb1}'"
qt_select "show tables from internal.${ex_db_name}"
- qt_select "show tables from ${catalog_name}.${ex_db_name}"
+ qt_select "show tables from ${catalog_name}.${mysql_show_db}"
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org