From ddc9ba89b65d75981c276fcab3376b7a7be94037 Mon Sep 17 00:00:00 2001 From: stephen Date: Sat, 27 Jul 2024 10:43:16 +0800 Subject: [PATCH] 4 --- .../doris/regression/suite/Suite.groovy | 2 +- .../test_trino_different_parquet_types.groovy | 20 ++++++++-------- .../hive/test_trino_hive_orc.groovy | 20 ++++++++-------- .../hive/test_trino_hive_other.groovy | 20 ++++++++-------- .../hive/test_trino_hive_parquet.groovy | 22 +++++++++--------- .../test_trino_hive_schema_evolution.groovy | 23 ++++++++++--------- .../hive/test_trino_hive_serde_prop.groovy | 22 +++++++++--------- .../test_trino_hive_tablesample_p0.groovy | 20 ++++++++-------- .../hive/test_trino_hive_tpch_sf1_orc.groovy | 20 ++++++++-------- .../test_trino_hive_tpch_sf1_parquet.groovy | 20 ++++++++-------- ...est_trino_prepare_hive_data_in_case.groovy | 22 +++++++++--------- .../kafka/test_trino_kafka_base.groovy | 23 ++++++++++--------- .../test_plugins_download.groovy | 21 +++++++++-------- 13 files changed, 130 insertions(+), 125 deletions(-) diff --git a/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/Suite.groovy b/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/Suite.groovy index 4d5127b8644496..2cd27b0968d5f0 100644 --- a/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/Suite.groovy +++ b/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/Suite.groovy @@ -877,7 +877,7 @@ class Suite implements GroovyInterceptable { if (exitcode != 0) { staticLogger.info("exit code: ${exitcode}, output\n: ${proc.text}") if (mustSuc == true) { - Assert.assertEquals(0, exitCode) + Assert.assertEquals(0, exitcode) } } } catch (IOException e) { diff --git a/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_different_parquet_types.groovy b/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_different_parquet_types.groovy index 4a450b999010de..fbf60ed2497eef 100644 --- a/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_different_parquet_types.groovy +++ b/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_different_parquet_types.groovy @@ -16,16 +16,6 @@ // under the License. suite("test_trino_different_parquet_types", "p0,external,hive,external_docker,external_docker_hive") { - def host_ips = new ArrayList() - String[][] backends = sql """ show backends """ - for (def b in backends) { - host_ips.add(b[1]) - } - String [][] frontends = sql """ show frontends """ - for (def f in frontends) { - host_ips.add(f[1]) - } - dispatchTrinoConnectors(host_ips.unique()) String hms_port = context.config.otherConfigs.get("hive2HmsPort") String hdfs_port = context.config.otherConfigs.get("hive2HdfsPort") @@ -185,6 +175,16 @@ suite("test_trino_different_parquet_types", "p0,external,hive,external_docker,ex String enabled = context.config.otherConfigs.get("enableHiveTest") if (enabled != null && enabled.equalsIgnoreCase("true")) { + def host_ips = new ArrayList() + String[][] backends = sql """ show backends """ + for (def b in backends) { + host_ips.add(b[1]) + } + String [][] frontends = sql """ show frontends """ + for (def f in frontends) { + host_ips.add(f[1]) + } + dispatchTrinoConnectors(host_ips.unique()) try { String catalog_name = "test_trino_different_parquet_types" sql """drop catalog if exists ${catalog_name}""" diff --git a/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_orc.groovy b/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_orc.groovy index 89255cfbc56840..d4cbcbe409bd37 100644 --- a/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_orc.groovy +++ b/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_orc.groovy @@ -16,16 +16,6 @@ // under the License. suite("test_trino_hive_orc", "all_types,external,hive,external_docker,external_docker_hive") { - def host_ips = new ArrayList() - String[][] backends = sql """ show backends """ - for (def b in backends) { - host_ips.add(b[1]) - } - String [][] frontends = sql """ show frontends """ - for (def f in frontends) { - host_ips.add(f[1]) - } - dispatchTrinoConnectors(host_ips.unique()) // Ensure that all types are parsed correctly def select_top50 = { @@ -88,6 +78,16 @@ suite("test_trino_hive_orc", "all_types,external,hive,external_docker,external_d String enabled = context.config.otherConfigs.get("enableHiveTest") if (enabled != null && enabled.equalsIgnoreCase("true")) { + def host_ips = new ArrayList() + String[][] backends = sql """ show backends """ + for (def b in backends) { + host_ips.add(b[1]) + } + String [][] frontends = sql """ show frontends """ + for (def f in frontends) { + host_ips.add(f[1]) + } + dispatchTrinoConnectors(host_ips.unique()) try { String hms_port = context.config.otherConfigs.get("hive2HmsPort") String catalog_name = "test_trino_hive_orc" diff --git a/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_other.groovy b/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_other.groovy index 9d3430d1ad0800..6d410b2cb9ad27 100644 --- a/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_other.groovy +++ b/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_other.groovy @@ -16,16 +16,6 @@ // under the License. suite("test_trino_hive_other", "external,hive,external_docker,external_docker_hive") { - def host_ips = new ArrayList() - String[][] backends = sql """ show backends """ - for (def b in backends) { - host_ips.add(b[1]) - } - String [][] frontends = sql """ show frontends """ - for (def f in frontends) { - host_ips.add(f[1]) - } - dispatchTrinoConnectors(host_ips.unique()) def q01 = { qt_q24 """ select name, count(1) as c from student group by name order by name desc;""" @@ -62,6 +52,16 @@ suite("test_trino_hive_other", "external,hive,external_docker,external_docker_hi String enabled = context.config.otherConfigs.get("enableHiveTest") if (enabled != null && enabled.equalsIgnoreCase("true")) { + def host_ips = new ArrayList() + String[][] backends = sql """ show backends """ + for (def b in backends) { + host_ips.add(b[1]) + } + String [][] frontends = sql """ show frontends """ + for (def f in frontends) { + host_ips.add(f[1]) + } + dispatchTrinoConnectors(host_ips.unique()) String hms_port = context.config.otherConfigs.get("hive2HmsPort") String hdfs_port = context.config.otherConfigs.get("hive2HdfsPort") String externalEnvIp = context.config.otherConfigs.get("externalEnvIp") diff --git a/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_parquet.groovy b/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_parquet.groovy index 658b342dff0028..748ac02b651fcf 100644 --- a/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_parquet.groovy +++ b/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_parquet.groovy @@ -16,17 +16,7 @@ // under the License. suite("test_trino_hive_parquet", "p0,external,hive,external_docker,external_docker_hive") { - def host_ips = new ArrayList() - String[][] backends = sql """ show backends """ - for (def b in backends) { - host_ips.add(b[1]) - } - String [][] frontends = sql """ show frontends """ - for (def f in frontends) { - host_ips.add(f[1]) - } - dispatchTrinoConnectors(host_ips.unique()) - + def q01 = { qt_q01 """ select * from partition_table order by l_orderkey, l_partkey, l_suppkey; @@ -182,6 +172,16 @@ suite("test_trino_hive_parquet", "p0,external,hive,external_docker,external_dock String enabled = context.config.otherConfigs.get("enableHiveTest") if (enabled != null && enabled.equalsIgnoreCase("true")) { + def host_ips = new ArrayList() + String[][] backends = sql """ show backends """ + for (def b in backends) { + host_ips.add(b[1]) + } + String [][] frontends = sql """ show frontends """ + for (def f in frontends) { + host_ips.add(f[1]) + } + dispatchTrinoConnectors(host_ips.unique()) try { String hms_port = context.config.otherConfigs.get("hive2HmsPort") String catalog_name = "test_trino_hive_parquet" diff --git a/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_schema_evolution.groovy b/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_schema_evolution.groovy index 1eb4a0f1b9ecd7..c803a988574cc8 100644 --- a/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_schema_evolution.groovy +++ b/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_schema_evolution.groovy @@ -16,17 +16,7 @@ // under the License. suite("test_trino_hive_schema_evolution", "p0,external,hive,external_docker,external_docker_hive") { - def host_ips = new ArrayList() - String[][] backends = sql """ show backends """ - for (def b in backends) { - host_ips.add(b[1]) - } - String [][] frontends = sql """ show frontends """ - for (def f in frontends) { - host_ips.add(f[1]) - } - dispatchTrinoConnectors(host_ips.unique()) - + def q_text = { qt_q01 """ select * from schema_evo_test_text order by id; @@ -67,6 +57,17 @@ suite("test_trino_hive_schema_evolution", "p0,external,hive,external_docker,exte String externalEnvIp = context.config.otherConfigs.get("externalEnvIp") if (enabled != null && enabled.equalsIgnoreCase("true")) { + def host_ips = new ArrayList() + String[][] backends = sql """ show backends """ + for (def b in backends) { + host_ips.add(b[1]) + } + String [][] frontends = sql """ show frontends """ + for (def f in frontends) { + host_ips.add(f[1]) + } + dispatchTrinoConnectors(host_ips.unique()) + try { String hms_port = context.config.otherConfigs.get("hive2HmsPort") String catalog_name = "test_trino_hive_schema_evolution" diff --git a/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_serde_prop.groovy b/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_serde_prop.groovy index 8479c14fcbcd36..b996d94f95d6df 100644 --- a/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_serde_prop.groovy +++ b/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_serde_prop.groovy @@ -16,19 +16,19 @@ // under the License. suite("test_trino_hive_serde_prop", "external_docker,hive,external_docker_hive,p0,external") { - def host_ips = new ArrayList() - String[][] backends = sql """ show backends """ - for (def b in backends) { - host_ips.add(b[1]) - } - String [][] frontends = sql """ show frontends """ - for (def f in frontends) { - host_ips.add(f[1]) - } - dispatchTrinoConnectors(host_ips.unique()) - + String enabled = context.config.otherConfigs.get("enableHiveTest") if (enabled != null && enabled.equalsIgnoreCase("true")) { + def host_ips = new ArrayList() + String[][] backends = sql """ show backends """ + for (def b in backends) { + host_ips.add(b[1]) + } + String [][] frontends = sql """ show frontends """ + for (def f in frontends) { + host_ips.add(f[1]) + } + dispatchTrinoConnectors(host_ips.unique()) String catalog_name = "test_trino_hive_serde_prop" String ex_db_name = "`stats_test`" String externalEnvIp = context.config.otherConfigs.get("externalEnvIp") diff --git a/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_tablesample_p0.groovy b/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_tablesample_p0.groovy index be760d381dfd5a..8752f2f4b41c2c 100644 --- a/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_tablesample_p0.groovy +++ b/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_tablesample_p0.groovy @@ -16,19 +16,19 @@ // under the License. suite("test_trino_hive_tablesample_p0", "all_types,p0,external,hive,external_docker,external_docker_hive") { - def host_ips = new ArrayList() - String[][] backends = sql """ show backends """ - for (def b in backends) { - host_ips.add(b[1]) - } - String [][] frontends = sql """ show frontends """ - for (def f in frontends) { - host_ips.add(f[1]) - } - dispatchTrinoConnectors(host_ips.unique()) String enabled = context.config.otherConfigs.get("enableHiveTest") if (enabled != null && enabled.equalsIgnoreCase("true")) { + def host_ips = new ArrayList() + String[][] backends = sql """ show backends """ + for (def b in backends) { + host_ips.add(b[1]) + } + String [][] frontends = sql """ show frontends """ + for (def f in frontends) { + host_ips.add(f[1]) + } + dispatchTrinoConnectors(host_ips.unique()) try { String hms_port = context.config.otherConfigs.get("hive2HmsPort") String catalog_name = "test_trino_hive_tablesample_p0" diff --git a/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_tpch_sf1_orc.groovy b/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_tpch_sf1_orc.groovy index cafd930175363d..6ee38e0021d450 100644 --- a/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_tpch_sf1_orc.groovy +++ b/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_tpch_sf1_orc.groovy @@ -16,16 +16,6 @@ // under the License. suite("test_trino_hive_tpch_sf1_orc", "p0,external,hive,external_docker,external_docker_hive") { - def host_ips = new ArrayList() - String[][] backends = sql """ show backends """ - for (def b in backends) { - host_ips.add(b[1]) - } - String [][] frontends = sql """ show frontends """ - for (def f in frontends) { - host_ips.add(f[1]) - } - dispatchTrinoConnectors(host_ips.unique()) String enable_file_cache = "false" def q01 = { @@ -857,6 +847,16 @@ order by String enabled = context.config.otherConfigs.get("enableHiveTest") if (enabled != null && enabled.equalsIgnoreCase("true")) { + def host_ips = new ArrayList() + String[][] backends = sql """ show backends """ + for (def b in backends) { + host_ips.add(b[1]) + } + String [][] frontends = sql """ show frontends """ + for (def f in frontends) { + host_ips.add(f[1]) + } + dispatchTrinoConnectors(host_ips.unique()) String hms_port = context.config.otherConfigs.get("hive2HmsPort") String catalog_name = "test_trino_hive_tpch_sf1_orc" String externalEnvIp = context.config.otherConfigs.get("externalEnvIp") diff --git a/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_tpch_sf1_parquet.groovy b/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_tpch_sf1_parquet.groovy index 4034ac805ef0be..8bd86c7def161a 100644 --- a/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_tpch_sf1_parquet.groovy +++ b/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_hive_tpch_sf1_parquet.groovy @@ -16,16 +16,6 @@ // under the License. suite("test_trino_hive_tpch_sf1_parquet", "p0,external,hive,external_docker,external_docker_hive") { - def host_ips = new ArrayList() - String[][] backends = sql """ show backends """ - for (def b in backends) { - host_ips.add(b[1]) - } - String [][] frontends = sql """ show frontends """ - for (def f in frontends) { - host_ips.add(f[1]) - } - dispatchTrinoConnectors(host_ips.unique()) String enable_file_cache = "false" def q01 = { @@ -857,6 +847,16 @@ order by String enabled = context.config.otherConfigs.get("enableHiveTest") if (enabled != null && enabled.equalsIgnoreCase("true")) { + def host_ips = new ArrayList() + String[][] backends = sql """ show backends """ + for (def b in backends) { + host_ips.add(b[1]) + } + String [][] frontends = sql """ show frontends """ + for (def f in frontends) { + host_ips.add(f[1]) + } + dispatchTrinoConnectors(host_ips.unique()) String hms_port = context.config.otherConfigs.get("hive2HmsPort") String catalog_name = "test_trino_hive_tpch_sf1_parquet" String externalEnvIp = context.config.otherConfigs.get("externalEnvIp") diff --git a/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_prepare_hive_data_in_case.groovy b/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_prepare_hive_data_in_case.groovy index 84049ac1db6ccb..a8b86014aa9f6b 100644 --- a/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_prepare_hive_data_in_case.groovy +++ b/regression-test/suites/external_table_p0/trino_connector/hive/test_trino_prepare_hive_data_in_case.groovy @@ -16,20 +16,20 @@ // under the License. suite("test_trino_prepare_hive_data_in_case", "p0,external,hive,external_docker,external_docker_hive") { - def host_ips = new ArrayList() - String[][] backends = sql """ show backends """ - for (def b in backends) { - host_ips.add(b[1]) - } - String [][] frontends = sql """ show frontends """ - for (def f in frontends) { - host_ips.add(f[1]) - } - dispatchTrinoConnectors(host_ips.unique()) - + String enabled = context.config.otherConfigs.get("enableHiveTest") def catalog_name = "test_trino_prepare_hive_data_in_case" if (enabled != null && enabled.equalsIgnoreCase("true")) { + def host_ips = new ArrayList() + String[][] backends = sql """ show backends """ + for (def b in backends) { + host_ips.add(b[1]) + } + String [][] frontends = sql """ show frontends """ + for (def f in frontends) { + host_ips.add(f[1]) + } + dispatchTrinoConnectors(host_ips.unique()) try { String externalEnvIp = context.config.otherConfigs.get("externalEnvIp") String hms_port = context.config.otherConfigs.get("hive2HmsPort") diff --git a/regression-test/suites/external_table_p0/trino_connector/kafka/test_trino_kafka_base.groovy b/regression-test/suites/external_table_p0/trino_connector/kafka/test_trino_kafka_base.groovy index b1da4641866e2c..2f61764ec12a27 100644 --- a/regression-test/suites/external_table_p0/trino_connector/kafka/test_trino_kafka_base.groovy +++ b/regression-test/suites/external_table_p0/trino_connector/kafka/test_trino_kafka_base.groovy @@ -21,17 +21,6 @@ import org.apache.kafka.clients.producer.ProducerRecord import org.apache.kafka.clients.producer.ProducerConfig suite("test_trino_kafka_base", "external,kafka,external_docker,external_docker_kafka") { - // set up trino-connector plugins - def host_ips = new ArrayList() - String[][] backends = sql """ show backends """ - for (def b in backends) { - host_ips.add(b[1]) - } - String [][] frontends = sql """ show frontends """ - for (def f in frontends) { - host_ips.add(f[1]) - } - dispatchTrinoConnectors(host_ips.unique()) // Ensure that all types are parsed correctly def select_top50 = { @@ -43,6 +32,18 @@ suite("test_trino_kafka_base", "external,kafka,external_docker,external_docker_k String enabled_trino_connector = context.config.otherConfigs.get("enableTrinoConnectorTest") if (enabled != null && enabled.equalsIgnoreCase("true") && enabled_trino_connector!= null && enabled_trino_connector.equalsIgnoreCase("true")) { + // set up trino-connector plugins + def host_ips = new ArrayList() + String[][] backends = sql """ show backends """ + for (def b in backends) { + host_ips.add(b[1]) + } + String [][] frontends = sql """ show frontends """ + for (def f in frontends) { + host_ips.add(f[1]) + } + dispatchTrinoConnectors(host_ips.unique()) + def kafkaCsvTpoics = [ "trino_kafka_basic_data" ] diff --git a/regression-test/suites/external_table_p0/trino_connector/test_plugins_download.groovy b/regression-test/suites/external_table_p0/trino_connector/test_plugins_download.groovy index 3d28612cf62ffd..7de87325969cb5 100644 --- a/regression-test/suites/external_table_p0/trino_connector/test_plugins_download.groovy +++ b/regression-test/suites/external_table_p0/trino_connector/test_plugins_download.groovy @@ -16,14 +16,17 @@ // under the License. suite("test_plugins_download", "external,hive,external_docker,external_docker_hive") { - def host_ips = new ArrayList() - String[][] backends = sql """ show backends """ - for (def b in backends) { - host_ips.add(b[1]) + String enabled_trino_connector = context.config.otherConfigs.get("enableTrinoConnectorTest") + if (enabled != null && enabled.equalsIgnoreCase("true")) { + def host_ips = new ArrayList() + String[][] backends = sql """ show backends """ + for (def b in backends) { + host_ips.add(b[1]) + } + String [][] frontends = sql """ show frontends """ + for (def f in frontends) { + host_ips.add(f[1]) + } + dispatchTrinoConnectors(host_ips.unique()) } - String [][] frontends = sql """ show frontends """ - for (def f in frontends) { - host_ips.add(f[1]) - } - dispatchTrinoConnectors(host_ips.unique()) } \ No newline at end of file