zhangstar333 commented on code in PR #13657: URL: https://github.com/apache/doris/pull/13657#discussion_r1004446614
########## be/src/vec/exec/vjdbc_connector.cpp: ########## @@ -41,22 +42,26 @@ const char* JDBC_EXECUTOR_TRANSACTION_SIGNATURE = "()V"; JdbcConnector::JdbcConnector(const JdbcConnectorParam& param) : TableConnector(param.tuple_desc, param.query_string), _conn_param(param) {} -JdbcConnector::~JdbcConnector() { +Status JdbcConnector::close() { if (!_is_open) { - return; + return Status::OK(); } if (_is_in_transaction) { - abort_trans(); + RETURN_IF_ERROR(abort_trans()); } JNIEnv* env; - Status status; - RETURN_IF_STATUS_ERROR(status, JniUtil::GetJNIEnv(&env)); + RETURN_IF_ERROR(JniUtil::GetJNIEnv(&env)); + env->DeleteGlobalRef(_executor_clazz); + env->DeleteGlobalRef(_executor_list_clazz); + env->DeleteGlobalRef(_executor_object_clazz); + env->DeleteGlobalRef(_executor_string_clazz); Review Comment: could add those variables: jclass _executor_##RETURN_TYPE##_clazz; -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org