diff --git a/regression-test/data/external_table_p0/jdbc/test_mysql_jdbc_catalog.out b/regression-test/data/external_table_p0/jdbc/test_mysql_jdbc_catalog.out index b2101cd96c87b7..d561e9be06431d 100644 --- a/regression-test/data/external_table_p0/jdbc/test_mysql_jdbc_catalog.out +++ b/regression-test/data/external_table_p0/jdbc/test_mysql_jdbc_catalog.out @@ -1,11 +1,8 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !sql -- +-- !sql_current_catalog -- internal --- !sql -- -internal - --- !sql -- +-- !sql_current_catalog_after_switch -- mysql_jdbc_catalog -- !ex_tb0 -- @@ -378,7 +375,7 @@ year smallint Yes false \N NONE -- !auto_default_t2 -- 0 --- !sql -- +-- !sql_show_db_from_lower_case -- doris_1 doris_2 doris_3 @@ -388,27 +385,27 @@ init_db mysql show_test_do_not_modify --- !sql -- +-- !sql_show_tbl_from_lower_case -- doris_1 doris_2 doris_3 --- !sql -- +-- !sql1_from_lower_case -- DORIS --- !sql -- +-- !sql2_from_lower_case -- Doris --- !sql -- +-- !sql3_from_lower_case -- doris --- !sql -- +-- !sql_count_from_rename1 -- 1 --- !sql -- +-- !sql_count_from_rename2 -- 1 --- !sql -- +-- !sql1_conjuncts -- 10 \N 7744 11 \N -94 12 16970 95 @@ -425,30 +422,21 @@ doris 8 \N \N 9 \N \N --- !sql -- +-- !sql2_conjuncts -- --- !sql -- +-- !sql_ctas_partition_text_1 -- int_u bigint Yes true \N text varchar(65533) Yes true \N t2 text Yes false \N NONE --- !sql -- -varchar varchar(65533) Yes true \N -int_u bigint Yes false \N NONE - --- !sql -- -int_u bigint Yes true \N -text varchar(65533) Yes true \N -t2 varchar(65533) Yes false \N NONE - --- !sql -- +-- !sql_ctas_partition_text_2 -- varchar varchar(65533) Yes true \N int_u bigint Yes false \N NONE --- !sql -- +-- !sql_current_catalog -- internal --- !sql -- +-- !sql_current_catalog_after_switch -- mysql_jdbc_catalog -- !ex_tb0 -- @@ -821,7 +809,7 @@ year smallint Yes false \N NONE -- !auto_default_t2 -- 0 --- !sql -- +-- !sql_show_db_from_lower_case -- doris_1 doris_2 doris_3 @@ -831,27 +819,27 @@ init_db mysql show_test_do_not_modify --- !sql -- +-- !sql_show_tbl_from_lower_case -- doris_1 doris_2 doris_3 --- !sql -- +-- !sql1_from_lower_case -- DORIS --- !sql -- +-- !sql2_from_lower_case -- Doris --- !sql -- +-- !sql3_from_lower_case -- doris --- !sql -- +-- !sql_count_from_rename1 -- 1 --- !sql -- +-- !sql_count_from_rename2 -- 1 --- !sql -- +-- !sql1_conjuncts -- 10 0 7744 11 0 -94 12 16970 95 @@ -868,23 +856,14 @@ doris 8 0 0 9 0 0 --- !sql -- +-- !sql2_conjuncts -- --- !sql -- +-- !sql_ctas_partition_text_1 -- int_u bigint Yes true \N text varchar(65533) Yes true \N t2 text Yes false \N NONE --- !sql -- -varchar varchar(65533) Yes true \N -int_u bigint Yes false \N NONE - --- !sql -- -int_u bigint Yes true \N -text varchar(65533) Yes true \N -t2 varchar(65533) Yes false \N NONE - --- !sql -- +-- !sql_ctas_partition_text_2 -- varchar varchar(65533) Yes true \N int_u bigint Yes false \N NONE diff --git a/regression-test/suites/external_table_p0/jdbc/test_mysql_jdbc_catalog.groovy b/regression-test/suites/external_table_p0/jdbc/test_mysql_jdbc_catalog.groovy index c97c74ec28eb0f..3db6c227555f31 100644 --- a/regression-test/suites/external_table_p0/jdbc/test_mysql_jdbc_catalog.groovy +++ b/regression-test/suites/external_table_p0/jdbc/test_mysql_jdbc_catalog.groovy @@ -16,8 +16,6 @@ // under the License. suite("test_mysql_jdbc_catalog", "p0,external,mysql,external_docker,external_docker_mysql") { - qt_sql """select current_catalog()""" - String enabled = context.config.otherConfigs.get("enableJdbcTest") String externalEnvIp = context.config.otherConfigs.get("externalEnvIp") String s3_endpoint = getS3Endpoint() @@ -140,9 +138,9 @@ suite("test_mysql_jdbc_catalog", "p0,external,mysql,external_docker,external_doc PROPERTIES("replication_num" = "1"); """ - qt_sql """select current_catalog()""" + qt_sql_current_catalog """select current_catalog()""" sql """switch ${catalog_name}""" - qt_sql """select current_catalog()""" + qt_sql_current_catalog_after_switch """select current_catalog()""" sql """ use ${ex_db_name}""" order_qt_ex_tb0 """ select id, name from ${ex_tb0} order by id; """ @@ -544,11 +542,11 @@ suite("test_mysql_jdbc_catalog", "p0,external,mysql,external_docker,external_doc ); """ - qt_sql "show databases from mysql_lower_case_catalog;" - qt_sql "show tables from mysql_lower_case_catalog.doris_2;" - qt_sql "select * from mysql_lower_case_catalog.doris_2.doris_1 order by id;" - qt_sql "select * from mysql_lower_case_catalog.doris_2.doris_2 order by id;" - qt_sql "select * from mysql_lower_case_catalog.doris_2.doris_3 order by id;" + qt_sql_show_db_from_lower_case "show databases from mysql_lower_case_catalog;" + qt_sql_show_tbl_from_lower_case "show tables from mysql_lower_case_catalog.doris_2;" + qt_sql1_from_lower_case "select * from mysql_lower_case_catalog.doris_2.doris_1 order by id;" + qt_sql2_from_lower_case "select * from mysql_lower_case_catalog.doris_2.doris_2 order by id;" + qt_sql3_from_lower_case "select * from mysql_lower_case_catalog.doris_2.doris_3 order by id;" sql """ drop catalog if exists mysql_lower_case_catalog; """ sql """ drop catalog if exists mysql_lower_case_catalog2; """ @@ -604,11 +602,11 @@ suite("test_mysql_jdbc_catalog", "p0,external,mysql,external_docker,external_doc "driver_class" = "${driver_class}" );""" - qt_sql """select count(*) from mysql_rename1.doris_test.ex_tb1;""" + qt_sql_count_from_rename1 """select count(*) from mysql_rename1.doris_test.ex_tb1;""" sql """alter catalog mysql_rename1 rename mysql_rename2""" - qt_sql """select count(*) from mysql_rename2.doris_test.ex_tb1;""" + qt_sql_count_from_rename2 """select count(*) from mysql_rename2.doris_test.ex_tb1;""" sql """drop catalog if exists mysql_rename2;""" @@ -623,9 +621,9 @@ suite("test_mysql_jdbc_catalog", "p0,external,mysql,external_docker,external_doc "driver_class" = "${driver_class}" );""" - order_qt_sql """SELECT * FROM mysql_conjuncts.doris_test.compoundpredicate_test WHERE (pk > 4) OR ((pk < 6 OR pk > 7) AND col_int_undef_signed < 1);""" + order_qt_sql1_conjuncts """SELECT * FROM mysql_conjuncts.doris_test.compoundpredicate_test WHERE (pk > 4) OR ((pk < 6 OR pk > 7) AND col_int_undef_signed < 1);""" - order_qt_sql """select * from mysql_conjuncts.doris_test.text_push where pk <=7;""" + order_qt_sql2_conjuncts """select * from mysql_conjuncts.doris_test.text_push where pk <=7;""" // test create table as select sql """use internal.${internal_db_name}""" @@ -636,10 +634,10 @@ suite("test_mysql_jdbc_catalog", "p0,external,mysql,external_docker,external_doc sql """set enable_nereids_planner=true""" // 1. test text type column as distribution col sql """create table ctas_partition_text_1 distributed by hash(text) buckets 1 properties("replication_num" = "1") as select int_u, text, text as t2 from mysql_conjuncts.doris_test.all_types;""" - qt_sql """desc ctas_partition_text_1""" + qt_sql_ctas_partition_text_1 """desc ctas_partition_text_1""" // 2. test varchar type column as first col sql """create table ctas_partition_text_2 distributed by hash(int_u) buckets 1 properties("replication_num" = "1") as select varchar, int_u from mysql_conjuncts.doris_test.all_types;""" - qt_sql """desc ctas_partition_text_2""" + qt_sql_ctas_partition_text_2 """desc ctas_partition_text_2""" // ctas logic is different between new and old planner. // so need to test both. sql """drop catalog if exists mysql_conjuncts;"""