Skip to content

Commit

Permalink
Address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
zanmato1984 committed Apr 24, 2024
1 parent 18d54a3 commit 6b79553
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cpp/src/arrow/acero/query_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ int64_t GetTempStackSizeFromEnvVar() {
if (!maybe_env_value.ok()) {
return kDefaultTempStackSize;
}
auto env_value = *std::move(maybe_env_value);
std::string env_value = std::move(maybe_env_value).ValueUnsafe();
if (env_value.empty()) {
return kDefaultTempStackSize;
}
Expand Down Expand Up @@ -81,8 +81,8 @@ size_t QueryContext::GetThreadIndex() { return thread_indexer_(); }
size_t QueryContext::max_concurrency() const { return thread_indexer_.Capacity(); }

Result<util::TempVectorStack*> QueryContext::GetTempStack(size_t thread_index) {
static const int64_t temp_stack_size = internal::GetTempStackSizeFromEnvVar();
if (!tld_[thread_index].is_init) {
if (ARROW_PREDICT_FALSE(!tld_[thread_index].is_init)) {
static const int64_t temp_stack_size = internal::GetTempStackSizeFromEnvVar();
RETURN_NOT_OK(tld_[thread_index].stack.Init(memory_pool(), temp_stack_size));
tld_[thread_index].is_init = true;
}
Expand Down

0 comments on commit 6b79553

Please sign in to comment.