Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
1 change: 1 addition & 0 deletions regression-test/framework/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading