Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
js8544 committed Dec 19, 2023
1 parent 9c54a87 commit cf72c91
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cpp/src/arrow/compute/kernels/scalar_string_ascii.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2596,10 +2596,12 @@ struct SliceBytesTransform : StringSliceTransformBase {
}

if (step < 0) {
return std::max(static_cast<int64_t>(0), (stop - start + step + 1) / step);
return static_cast<int32_t>(
std::max(static_cast<int64_t>(0), (stop - start + step + 1) / step));
}

return std::max(static_cast<int64_t>(0), (stop - start + step - 1) / step);
return static_cast<int32_t>(
std::max(static_cast<int64_t>(0), (stop - start + step - 1) / step));
}
};

Expand Down

0 comments on commit cf72c91

Please sign in to comment.