You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/05/07 10:04:10 UTC

[GitHub] [incubator-doris] Gabriel39 commented on a diff in pull request #9440: [Vectorized][java-udf] add datetime&&largeint&&decimal type to java-udf

Gabriel39 commented on code in PR #9440:
URL: https://github.com/apache/incubator-doris/pull/9440#discussion_r867333425


##########
be/src/util/jni-util.cpp:
##########
@@ -16,6 +16,7 @@
 // under the License.
 
 #include "util/jni-util.h"
+#include "jni_md.h"

Review Comment:
   move this line below #ifdef LIBJVM



##########
be/src/util/jni-util.cpp:
##########
@@ -45,8 +46,10 @@ void FindOrCreateJavaVM() {
         vm_args.nOptions = 1;
         vm_args.ignoreUnrecognized = JNI_TRUE;
 
-        int res = JNI_CreateJavaVM(&g_vm, (void**)&env, &vm_args);
-        DCHECK_LT(res, 0) << "Failed tp create JVM, code= " << res;
+        jint res = JNI_CreateJavaVM(&g_vm, (void**)&env, &vm_args);
+        if (JNI_OK != res) {
+            DCHECK(false) << "Failed tp create JVM, code= " << res;

Review Comment:
   ```suggestion
               DCHECK(false) << "Failed to create JVM, code= " << res;
   ```



##########
be/src/vec/functions/function_java_udf.cpp:
##########
@@ -49,10 +49,12 @@ JavaFunctionCall::JavaFunctionCall(const TFunction& fn, const DataTypes& argumen
 
 Status JavaFunctionCall::prepare(FunctionContext* context,
                                  FunctionContext::FunctionStateScope scope) {
-    DCHECK(executor_cl_ == NULL) << "Init() already called!";
-    JNIEnv* env;
+    //DCHECK(executor_cl_ == NULL) << "Init() already called!";

Review Comment:
   maybe remove it directly



-- 
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-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org