HappenLee commented on code in PR #17848:
URL: https://github.com/apache/doris/pull/17848#discussion_r1138322437


##########
be/src/vec/aggregate_functions/aggregate_function_java_udaf.h:
##########
@@ -255,6 +251,13 @@ struct AggregateJavaUdafData {
         jboolean res = env->CallNonvirtualBooleanMethod(executor_obj, 
executor_cl,                 \
                                                         executor_result_id, 
to.size() - 1, place); \
         while (res != JNI_TRUE) {                                              
                    \
+            /*Add this check is now, the agg function can't deal with the 
return status, */        \
+            /*even we return a bad status, nobody could deal with it,*/        
                    \
+            /*so add this limit avoid std::bad_alloc, (1024<<10) is enough*/   
                    \
+            /*but this maybe get a mistake of result,when could handle 
exception need removethis*/ \
+            if (increase_buffer_size == 10) {                                  
                    \
+                return Status::OK();                                           
                    \

Review Comment:
   Do not return OK, return  reach mem limit error message 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to