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 90a13d324c..8f123bb8d6 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 @@ -850,8 +850,9 @@ class Suite implements GroovyInterceptable { 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 { @@ -862,8 +863,9 @@ class Suite implements GroovyInterceptable { } 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) } } @@ -893,8 +895,9 @@ class Suite implements GroovyInterceptable { 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 { @@ -905,8 +908,9 @@ class Suite implements GroovyInterceptable { } 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) } }