You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "yiguolei (via GitHub)" <gi...@apache.org> on 2023/07/18 17:02:29 UTC
[GitHub] [doris] yiguolei commented on a diff in pull request #21947: [fix](case function) Applying for an array in the heap to avoid stack…
yiguolei commented on code in PR #21947:
URL: https://github.com/apache/doris/pull/21947#discussion_r1267073744
##########
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:
the rows_count maybe too large? I think it should be less than 4096, do you really meet this problem?
--
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