Skip to content

Commit

Permalink
fix casting
Browse files Browse the repository at this point in the history
  • Loading branch information
arashandishgar committed Mar 8, 2025
1 parent 229ed3b commit d6c52ea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cpp/src/arrow/compute/kernels/scalar_string_ascii.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2425,10 +2425,10 @@ struct ExtractRegexSpan : ExtractRegexBase {
for (int i = 0; i < group_count; i++) {
// https://github.com/google/re2/issues/24#issuecomment-97653183
if (found_values[i].data() != nullptr) {
OffsetCType begin = found_values[i].data() - element.data();
OffsetCType size = found_values[i].size();
array_builders[i]->UnsafeAppend(begin);
array_builders[i]->UnsafeAppend(size);
int64_t begin = found_values[i].data() - element.data();
int64_t size = found_values[i].size();
array_builders[i]->UnsafeAppend(static_cast<OffsetCType>(begin));
array_builders[i]->UnsafeAppend(static_cast<OffsetCType>(size));
ARROW_RETURN_NOT_OK(span_builders[i]->Append());
} else {
ARROW_RETURN_NOT_OK(span_builders[i]->AppendNull());
Expand Down

0 comments on commit d6c52ea

Please sign in to comment.