This is an automated email from the ASF dual-hosted git repository. zouxinyi pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new c36b0ccde25 [fix](arrow-flight-sql) Fix Arrow Flight SQL regression-test (#44894) c36b0ccde25 is described below commit c36b0ccde25c90e9f83c974f367f252499fe3ecd Author: Xinyi Zou <zouxi...@selectdb.com> AuthorDate: Wed Dec 4 10:46:56 2024 +0800 [fix](arrow-flight-sql) Fix Arrow Flight SQL regression-test (#44894) ### What problem does this PR solve? Problem Summary: Fix Arrow Flight SQL profile Fix regression-test frametwork --- .../service/arrowflight/FlightSqlConnectProcessor.java | 2 +- regression-test/framework/pom.xml | 1 + .../main/groovy/org/apache/doris/regression/Config.groovy | 14 +++++++++----- .../org/apache/doris/regression/suite/SuiteContext.groovy | 2 +- .../suites/nereids_p0/show/test_show_create_view.groovy | 2 +- 5 files changed, 13 insertions(+), 8 deletions(-) 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 3fba602a1c1..345d7d824a2 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 class FlightSqlConnectProcessor extends ConnectProcessor implements AutoC 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 6b749bf0fd1..813659989ae 100644 --- a/regression-test/framework/pom.xml +++ b/regression-test/framework/pom.xml @@ -75,6 +75,7 @@ under the License. <antlr.version>4.9.3</antlr.version> <hadoop.version>2.8.0</hadoop.version> <aws-java-sdk-s3.version>1.11.95</aws-java-sdk-s3.version> + <!-- Arrow 18 only supports jdk17 --> <arrow.version>17.0.0</arrow.version> </properties> <build> 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 2f632f5c925..e08ec604577 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 d2d49efa1a8..88ad1fac355 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 65ed4758a9a..be3e691f6df 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 { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org