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) } }