Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
mapleFU committed Sep 3, 2024
1 parent 6123737 commit 34e3474
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cpp/src/arrow/compute/row/row_encoder_internal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,12 @@ void RowEncoder::Init(const std::vector<TypeHolder>& column_types, ExecContext*
void RowEncoder::Clear() {
offsets_.clear();
bytes_.clear();
fixed_with_row_count_ = 0;
fixed_width_row_count_ = 0;
}

Status RowEncoder::EncodeAndAppendForFixedWidth(const ExecSpan& batch) {
size_t length_before =
static_cast<size_t>(this->fixed_width_length_) * this->fixed_with_row_count_;
static_cast<size_t>(this->fixed_width_length_) * this->fixed_width_row_count_;
ARROW_CHECK_EQ(length_before, bytes_.size());
#ifndef NDEBUG
{
Expand All @@ -356,7 +356,7 @@ Status RowEncoder::EncodeAndAppendForFixedWidth(const ExecSpan& batch) {
for (int64_t i = 0; i < batch.length; ++i) {
buf_ptrs[i] = bytes_.data() + length_before + i * fixed_width_length_;
}
fixed_with_row_count_ += batch.length;
fixed_width_row_count_ += batch.length;
for (int i = 0; i < batch.num_values(); ++i) {
RETURN_NOT_OK(encoders_[i]->Encode(batch[i], batch.length, buf_ptrs.data()));
}
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/arrow/compute/row/row_encoder_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ class ARROW_EXPORT RowEncoder {

int32_t num_rows() const {
if (IsFixedWidth()) {
return fixed_with_row_count_;
return fixed_width_row_count_;
}
return offsets_.empty() ? 0 : static_cast<int32_t>(offsets_.size() - 1);
}
Expand All @@ -407,7 +407,7 @@ class ARROW_EXPORT RowEncoder {
// doesn't need to maintain the row offsets. In this case, the
// offsets_.size() would be also empty.
int32_t fixed_width_length_{kInvalidFixedWidthOffset};
int32_t fixed_with_row_count_{0};
int32_t fixed_width_row_count_{0};
// offsets_ vector stores the starting position (offset) of each encoded row
// within the bytes_ vector. This allows for quick access to individual rows.
//
Expand Down

0 comments on commit 34e3474

Please sign in to comment.