| 306 | |
| 307 | template <typename RunEndCType> |
| 308 | Status RunEndEncodedBuilder::DoAppendRunEnd(int64_t run_end) { |
| 309 | constexpr auto max = std::numeric_limits<RunEndCType>::max(); |
| 310 | if (ARROW_PREDICT_FALSE(run_end > max)) { |
| 311 | return Status::Invalid("Run end value must fit on run ends type but ", run_end, " > ", |
| 312 | max, "."); |
| 313 | } |
| 314 | return internal::checked_cast<typename CTypeTraits<RunEndCType>::BuilderType*>( |
| 315 | children_[0].get()) |
| 316 | ->Append(static_cast<RunEndCType>(run_end)); |
| 317 | } |
| 318 | |
| 319 | Status RunEndEncodedBuilder::AppendRunEnd(int64_t run_end) { |
| 320 | switch (type_->run_end_type()->id()) { |