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

[GitHub] [doris] zxealous commented on a diff in pull request #21947: [fix](case function) Applying for an array in the heap to avoid stack overflow

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


##########
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:
   @yiguolei plz help me cc



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