You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "HappenLee (via GitHub)" <gi...@apache.org> on 2023/03/16 09:00:27 UTC

[GitHub] [doris] HappenLee commented on a diff in pull request #17848: [vectorized](udaf) fix java udaf meet error of std::bad_alloc

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: 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