zxealous commented on code in PR #21947:
URL: https://github.com/apache/doris/pull/21947#discussion_r1267470405


##########
be/src/vec/functions/function_case.h:
##########
@@ -167,9 +167,9 @@ class FunctionCase : public IFunction {
         int rows_count = column_holder.rows_count;
 
         // `then` data index corresponding to each row of results, 0 
represents `else`.
-        int then_idx[rows_count];
-        int* __restrict then_idx_ptr = then_idx;
-        memset(then_idx_ptr, 0, sizeof(then_idx));
+        std::unique_ptr<int> then_idx(new int[rows_count]);

Review Comment:
   I have meet this problem in 1.1,  the rows_count is  > 5000w, cause all 
backends core dump, the problem was fixed by #17035, but it is hard to pick it 
to branch 1.1. I think changing it on the master can also avoid the same 
problem again.



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