diff --git a/fe/fe-core/src/main/java/org/apache/doris/service/arrowflight/FlightSqlConnectProcessor.java b/fe/fe-core/src/main/java/org/apache/doris/service/arrowflight/FlightSqlConnectProcessor.java index 3fba602a1c1e2f..345d7d824a23ff 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/service/arrowflight/FlightSqlConnectProcessor.java +++ b/fe/fe-core/src/main/java/org/apache/doris/service/arrowflight/FlightSqlConnectProcessor.java @@ -196,11 +196,11 @@ public void fetchArrowFlightSchema(int timeoutMs) { public void close() throws Exception { ctx.setCommand(MysqlCommand.COM_SLEEP); ctx.clear(); - // TODO support query profile for (StmtExecutor asynExecutor : returnResultFromRemoteExecutor) { asynExecutor.finalizeQuery(); } returnResultFromRemoteExecutor.clear(); + executor.finalizeQuery(); ConnectContext.remove(); } } diff --git a/regression-test/framework/pom.xml b/regression-test/framework/pom.xml index 6b749bf0fd1dae..813659989ae60c 100644 --- a/regression-test/framework/pom.xml +++ b/regression-test/framework/pom.xml @@ -75,6 +75,7 @@ under the License. 4.9.3 2.8.0 1.11.95 + 17.0.0 diff --git a/regression-test/framework/src/main/groovy/org/apache/doris/regression/Config.groovy b/regression-test/framework/src/main/groovy/org/apache/doris/regression/Config.groovy index 2f632f5c9252a7..e08ec60457707f 100644 --- a/regression-test/framework/src/main/groovy/org/apache/doris/regression/Config.groovy +++ b/regression-test/framework/src/main/groovy/org/apache/doris/regression/Config.groovy @@ -1064,19 +1064,23 @@ class Config { return buildUrlWithDb(jdbcUrl, dbName) } - Connection getConnectionByArrowFlightSql(String dbName) { + Connection getConnectionByArrowFlightSqlDbName(String dbName) { Class.forName("org.apache.arrow.driver.jdbc.ArrowFlightJdbcDriver") String arrowFlightSqlHost = otherConfigs.get("extArrowFlightSqlHost") String arrowFlightSqlPort = otherConfigs.get("extArrowFlightSqlPort") String arrowFlightSqlUrl = "jdbc:arrow-flight-sql://${arrowFlightSqlHost}:${arrowFlightSqlPort}" + "/?useServerPrepStmts=false&useSSL=false&useEncryption=false" - // TODO jdbc:arrow-flight-sql not support connect db - String dbUrl = buildUrlWithDbImpl(arrowFlightSqlUrl, dbName) + // Arrow 17.0.0-rc03 support jdbc:arrow-flight-sql connect db + // https://github.com/apache/arrow/issues/41947 + if (dbName?.trim()) { + arrowFlightSqlUrl = "jdbc:arrow-flight-sql://${arrowFlightSqlHost}:${arrowFlightSqlPort}" + + "/catalog=" + dbName + "?useServerPrepStmts=false&useSSL=false&useEncryption=false" + } tryCreateDbIfNotExist(dbName) - log.info("connect to ${dbUrl}".toString()) + log.info("connect to ${arrowFlightSqlUrl}".toString()) String arrowFlightSqlJdbcUser = otherConfigs.get("extArrowFlightSqlUser") String arrowFlightSqlJdbcPassword = otherConfigs.get("extArrowFlightSqlPassword") - return DriverManager.getConnection(dbUrl, arrowFlightSqlJdbcUser, arrowFlightSqlJdbcPassword) + return DriverManager.getConnection(arrowFlightSqlUrl, arrowFlightSqlJdbcUser, arrowFlightSqlJdbcPassword) } Connection getDownstreamConnection() { diff --git a/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/SuiteContext.groovy b/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/SuiteContext.groovy index d2d49efa1a86de..88ad1fac355d17 100644 --- a/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/SuiteContext.groovy +++ b/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/SuiteContext.groovy @@ -156,7 +156,7 @@ class SuiteContext implements Closeable { def threadConnInfo = threadArrowFlightSqlConn.get() if (threadConnInfo == null) { threadConnInfo = new ConnectionInfo() - threadConnInfo.conn = config.getConnectionByArrowFlightSql(dbName) + threadConnInfo.conn = config.getConnectionByArrowFlightSqlDbName(dbName) threadConnInfo.username = config.jdbcUser threadConnInfo.password = config.jdbcPassword threadArrowFlightSqlConn.set(threadConnInfo) diff --git a/regression-test/suites/nereids_p0/show/test_show_create_view.groovy b/regression-test/suites/nereids_p0/show/test_show_create_view.groovy index 65ed4758a9ae66..be3e691f6dfc38 100644 --- a/regression-test/suites/nereids_p0/show/test_show_create_view.groovy +++ b/regression-test/suites/nereids_p0/show/test_show_create_view.groovy @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -suite("test_show_create_view", "query,arrow_flight_sql") { +suite("test_show_create_view", "query") { String view_name = "view_show_create_view"; String table_name = "table_for_view_test"; try {