You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/08/24 04:23:49 UTC

[GitHub] [arrow] zhztheplayer commented on a change in pull request #10883: ARROW-7272: [C++][Java] JNI bridge between RecordBatch and VectorSchemaRoot

zhztheplayer commented on a change in pull request #10883:
URL: https://github.com/apache/arrow/pull/10883#discussion_r694480775



##########
File path: cpp/src/jni/dataset/jni_util.cc
##########
@@ -162,31 +194,40 @@ std::shared_ptr<ReservationListener> ReservationListenableMemoryPool::get_listen
 
 ReservationListenableMemoryPool::~ReservationListenableMemoryPool() {}
 
+Status CheckException(JNIEnv* env) {
+  if (env->ExceptionCheck()) {
+    env->ExceptionDescribe();
+    env->ExceptionClear();
+    return Status::Invalid("Error during calling Java code from native code");
+  }
+  return Status::OK();
+}
+
 jclass CreateGlobalClassReference(JNIEnv* env, const char* class_name) {
   jclass local_class = env->FindClass(class_name);
   jclass global_class = (jclass)env->NewGlobalRef(local_class);
   env->DeleteLocalRef(local_class);
   return global_class;
 }
 
-arrow::Result<jmethodID> GetMethodID(JNIEnv* env, jclass this_class, const char* name,

Review comment:
       Agreed. The Nit changes was now removed from this PR. I'll make another :)




-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org