Skip to content

Commit

Permalink
fix unsafe cast
Browse files Browse the repository at this point in the history
  • Loading branch information
js8544 committed Jul 27, 2023
1 parent cba22d6 commit 2db10e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/src/arrow/compute/kernels/vector_selection_internal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ struct SparseUnionSelectionImpl

TypedBufferBuilder<int8_t> child_id_buffer_builder_;
std::vector<int8_t> type_codes_;
std::vector<Int32Builder> child_indices_builders_;
std::vector<Int64Builder> child_indices_builders_;

SparseUnionSelectionImpl(KernelContext* ctx, const ExecSpan& batch,
int64_t output_length, ExecResult* out)
Expand All @@ -757,7 +757,7 @@ struct SparseUnionSelectionImpl
type_codes_(checked_cast<const UnionType&>(*this->values.type).type_codes()),
child_indices_builders_(type_codes_.size()) {
for (auto& child_indices_builder : child_indices_builders_) {
child_indices_builder = Int32Builder(ctx->memory_pool());
child_indices_builder = Int64Builder(ctx->memory_pool());
}
}

Expand Down

0 comments on commit 2db10e7

Please sign in to comment.