From 12eccad08d370b7acd1f075b447dcc8462f9b277 Mon Sep 17 00:00:00 2001 From: daidai Date: Wed, 1 Jul 2026 14:41:55 +0800 Subject: [PATCH] [fix](case) Stabilize max compute schema metadata case checks. (#64959) --- .../maxcompute/test_max_compute_schema.out | 51 +++++++++++++++---- .../maxcompute/test_max_compute_schema.groovy | 35 +++++++++---- 2 files changed, 65 insertions(+), 21 deletions(-) diff --git a/regression-test/data/external_table_p2/maxcompute/test_max_compute_schema.out b/regression-test/data/external_table_p2/maxcompute/test_max_compute_schema.out index eaaa45dd88b64e..adbcd23b668f9b 100644 --- a/regression-test/data/external_table_p2/maxcompute/test_max_compute_schema.out +++ b/regression-test/data/external_table_p2/maxcompute/test_max_compute_schema.out @@ -1,20 +1,32 @@ -- This file is automatically generated. You should know what you did if you want to edit this --- !show_db_1 -- +-- !show_db_analytics -- analytics + +-- !show_db_default -- default + +-- !show_db_information_schema -- information_schema + +-- !show_db_iot -- iot + +-- !show_db_mysql -- mysql --- !show_tb_1 -- +-- !show_tb_order_detail -- order_detail + +-- !show_tb_user_info -- user_info --- !show_tb_2 -- +-- !show_tb_product_sales -- product_sales + +-- !show_tb_web_log -- web_log --- !show_tb_3 -- +-- !show_tb_employee_salary -- employee_salary -- !show_par -- @@ -34,13 +46,19 @@ department text Yes true \N salary decimal(10,2) Yes true \N hire_date date Yes true \N --- !show_db_2 -- +-- !show_db_information_schema -- information_schema + +-- !show_db_mc_project -- mc_datalake_schema + +-- !show_db_mysql -- mysql --- !show_tb_4 -- +-- !show_tb_order_detail -- order_detail + +-- !show_tb_user_info -- user_info -- !mc_old_q1 -- @@ -58,22 +76,34 @@ user_info 6 ORD006 640 Bob 202512 7 ORD007 220 Carol 202512 --- !show_db_1 -- +-- !show_db_analytics -- analytics + +-- !show_db_default -- default + +-- !show_db_information_schema -- information_schema + +-- !show_db_iot -- iot + +-- !show_db_mysql -- mysql --- !show_tb_1 -- +-- !show_tb_order_detail -- order_detail + +-- !show_tb_user_info -- user_info --- !show_tb_2 -- +-- !show_tb_product_sales -- product_sales + +-- !show_tb_web_log -- web_log --- !show_tb_3 -- +-- !show_tb_employee_salary -- employee_salary -- !show_par -- @@ -255,4 +285,3 @@ Laptop IT 13500.00 -- !mc_join_q35 -- ORD001 Keyboard Tom ORD002 Mouse Jerry - diff --git a/regression-test/suites/external_table_p2/maxcompute/test_max_compute_schema.groovy b/regression-test/suites/external_table_p2/maxcompute/test_max_compute_schema.groovy index b89c92fabdd278..d317c43da212d4 100644 --- a/regression-test/suites/external_table_p2/maxcompute/test_max_compute_schema.groovy +++ b/regression-test/suites/external_table_p2/maxcompute/test_max_compute_schema.groovy @@ -111,27 +111,36 @@ suite("test_max_compute_schema", "p2,external,maxcompute,external_remote,externa """ sql """ switch ${mc_catalog_name};""" - order_qt_show_db_1 """ show databases; """ + order_qt_show_db_analytics """ show databases like "analytics"; """ + order_qt_show_db_default """ show databases like "default"; """ + order_qt_show_db_information_schema """ show databases like "information\\_schema"; """ + order_qt_show_db_iot """ show databases like "iot"; """ + order_qt_show_db_mysql """ show databases like "mysql"; """ sql """ use `default`; """ - order_qt_show_tb_1 """ show tables; """ + order_qt_show_tb_order_detail """ show tables like "order\\_detail"; """ + order_qt_show_tb_user_info """ show tables like "user\\_info"; """ sql """ use `analytics`; """ - order_qt_show_tb_2 """ show tables; """ + order_qt_show_tb_product_sales """ show tables like "product\\_sales"; """ + order_qt_show_tb_web_log """ show tables like "web\\_log"; """ sql """ use `iot`; """ - order_qt_show_tb_3 """ show tables; """ + order_qt_show_tb_employee_salary """ show tables like "employee\\_salary"; """ order_qt_show_par """ show partitions from `default`.order_detail; """ order_qt_show_par2 """ show partitions from analytics.web_log; """ qt_desc """ desc iot.employee_salary; """ sql """ alter catalog ${mc_catalog_name} set PROPERTIES("mc.enable.namespace.schema" = "false"); """ - qt_show_db_2 """ show databases;""" + qt_show_db_information_schema """ show databases like "information\\_schema";""" + qt_show_db_mc_project """ show databases like "${mc_project.replace("_", "\\_")}";""" + qt_show_db_mysql """ show databases like "mysql";""" sql """ use ${mc_project}; """ - order_qt_show_tb_4 """ show tables; """ + order_qt_show_tb_order_detail """ show tables like "order\\_detail"; """ + order_qt_show_tb_user_info """ show tables like "user\\_info"; """ qt_mc_old_q1 """ SELECT * FROM user_info ORDER BY id;""" qt_mc_old_q2 """ SELECT * FROM order_detail ORDER BY id;""" @@ -140,18 +149,24 @@ suite("test_max_compute_schema", "p2,external,maxcompute,external_remote,externa - order_qt_show_db_1 """ show databases; """ + order_qt_show_db_analytics """ show databases like "analytics"; """ + order_qt_show_db_default """ show databases like "default"; """ + order_qt_show_db_information_schema """ show databases like "information\\_schema"; """ + order_qt_show_db_iot """ show databases like "iot"; """ + order_qt_show_db_mysql """ show databases like "mysql"; """ sql """ use `default`; """ - order_qt_show_tb_1 """ show tables; """ + order_qt_show_tb_order_detail """ show tables like "order\\_detail"; """ + order_qt_show_tb_user_info """ show tables like "user\\_info"; """ sql """ use `analytics`; """ - order_qt_show_tb_2 """ show tables; """ + order_qt_show_tb_product_sales """ show tables like "product\\_sales"; """ + order_qt_show_tb_web_log """ show tables like "web\\_log"; """ sql """ use `iot`; """ - order_qt_show_tb_3 """ show tables; """ + order_qt_show_tb_employee_salary """ show tables like "employee\\_salary"; """ order_qt_show_par """ show partitions from `default`.order_detail; """ order_qt_show_par2 """ show partitions from analytics.web_log; """