Skip to content

Commit

Permalink
Remove stale static cast
Browse files Browse the repository at this point in the history
  • Loading branch information
zanmato1984 committed Feb 9, 2024
1 parent 7aa03bd commit 460dfe3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions cpp/src/arrow/compute/light_array.cc
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,7 @@ Status ColumnArraysFromExecBatch(const ExecBatch& batch, int64_t start_row,

Status ColumnArraysFromExecBatch(const ExecBatch& batch,
std::vector<KeyColumnArray>* column_arrays) {
return ColumnArraysFromExecBatch(batch, 0, static_cast<int>(batch.length),
column_arrays);
return ColumnArraysFromExecBatch(batch, 0, batch.length, column_arrays);
}

void ResizableArrayData::Init(const std::shared_ptr<DataType>& data_type,
Expand Down Expand Up @@ -355,9 +354,9 @@ std::shared_ptr<ArrayData> ResizableArrayData::array_data() const {
KeyColumnMetadata column_metadata;
column_metadata = ColumnMetadataFromDataType(data_type_).ValueOrDie();

auto valid_count = arrow::internal::CountSetBits(
buffers_[kValidityBuffer]->data(), /*offset=*/0, static_cast<int64_t>(num_rows_));
int null_count = static_cast<int>(num_rows_) - static_cast<int>(valid_count);
auto valid_count = arrow::internal::CountSetBits(buffers_[kValidityBuffer]->data(),
/*offset=*/0, num_rows_);
auto null_count = num_rows_ - valid_count;

if (column_metadata.is_fixed_length) {
return ArrayData::Make(data_type_, num_rows_,
Expand Down

0 comments on commit 460dfe3

Please sign in to comment.