From 871c0e11d807674fb13fbb76139c5e600088fa1d Mon Sep 17 00:00:00 2001 From: w41ter Date: Sun, 28 Apr 2024 08:30:52 +0000 Subject: [PATCH] [improve](regression) Support qt_target_sql --- .../doris/regression/suite/Suite.groovy | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 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 faaabac6792b42..4971f6876a0ce5 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 @@ -887,24 +887,26 @@ class Suite implements GroovyInterceptable { if (arg instanceof PreparedStatement) { if (tag.contains("hive_docker")) { tupleResult = JdbcUtils.executeToStringList(context.getHiveDockerConnection(hivePrefix), (PreparedStatement) arg) - }else if (tag.contains("hive_remote")) { + } else if (tag.contains("hive_remote")) { tupleResult = JdbcUtils.executeToStringList(context.getHiveRemoteConnection(), (PreparedStatement) arg) } else if (tag.contains("arrow_flight_sql") || context.useArrowFlightSql()) { tupleResult = JdbcUtils.executeToStringList(context.getArrowFlightSqlConnection(), (PreparedStatement) arg) - } - else{ + } else if (tag.contains("target_sql")) { + tupleResult = JdbcUtils.executeToStringList(context.getTargetConnection(this), (PreparedStatement) arg) + } else { tupleResult = JdbcUtils.executeToStringList(context.getConnection(), (PreparedStatement) arg) } } else { if (tag.contains("hive_docker")) { tupleResult = JdbcUtils.executeToStringList(context.getHiveDockerConnection(hivePrefix), (String) arg) - }else if (tag.contains("hive_remote")) { + } else if (tag.contains("hive_remote")) { tupleResult = JdbcUtils.executeToStringList(context.getHiveRemoteConnection(), (String) arg) } else if (tag.contains("arrow_flight_sql") || context.useArrowFlightSql()) { tupleResult = JdbcUtils.executeToStringList(context.getArrowFlightSqlConnection(), (String) ("USE ${context.dbName};" + (String) arg)) - } - else{ + } else if (tag.contains("target_sql")) { + tupleResult = JdbcUtils.executeToStringList(context.getTargetConnection(this), (String) arg) + } else { tupleResult = JdbcUtils.executeToStringList(context.getConnection(), (String) arg) } } @@ -930,24 +932,26 @@ class Suite implements GroovyInterceptable { if (arg instanceof PreparedStatement) { if (tag.contains("hive_docker")) { tupleResult = JdbcUtils.executeToStringList(context.getHiveDockerConnection(hivePrefix), (PreparedStatement) arg) - }else if (tag.contains("hive_remote")) { + } else if (tag.contains("hive_remote")) { tupleResult = JdbcUtils.executeToStringList(context.getHiveRemoteConnection(), (PreparedStatement) arg) } else if (tag.contains("arrow_flight_sql") || context.useArrowFlightSql()) { tupleResult = JdbcUtils.executeToStringList(context.getArrowFlightSqlConnection(), (PreparedStatement) arg) - } - else{ + } else if (tag.contains("target_sql")) { + tupleResult = JdbcUtils.executeToStringList(context.getTargetConnection(this), (PreparedStatement) arg) + } else { tupleResult = JdbcUtils.executeToStringList(context.getConnection(), (PreparedStatement) arg) } } else { if (tag.contains("hive_docker")) { tupleResult = JdbcUtils.executeToStringList(context.getHiveDockerConnection(hivePrefix), (String) arg) - }else if (tag.contains("hive_remote")) { + } else if (tag.contains("hive_remote")) { tupleResult = JdbcUtils.executeToStringList(context.getHiveRemoteConnection(), (String) arg) } else if (tag.contains("arrow_flight_sql") || context.useArrowFlightSql()) { tupleResult = JdbcUtils.executeToStringList(context.getArrowFlightSqlConnection(), (String) ("USE ${context.dbName};" + (String) arg)) - } - else{ + } else if (tag.contains("target_sql")) { + tupleResult = JdbcUtils.executeToStringList(context.getTargetConnection(this), (String) arg) + } else { tupleResult = JdbcUtils.executeToStringList(context.getConnection(), (String) arg) } }