Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
zanmato1984 committed Dec 18, 2024
1 parent be4d347 commit a2c702b
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions cpp/src/arrow/stl.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,24 +192,25 @@ struct ConversionTraits<std::array<ValueCType, N>>
: public CTypeTraits<std::array<ValueCType, N>> {
static arrow::Status AppendRow(FixedSizeListBuilder& builder,
const std::array<ValueCType, N>& values) {
auto vb = ::arrow::internal::checked_cast<typename CTypeTraits<ValueCType>::BuilderType*>(
builder.value_builder());
auto vb =
::arrow::internal::checked_cast<typename CTypeTraits<ValueCType>::BuilderType*>(
builder.value_builder());
ARROW_RETURN_NOT_OK(builder.Append());
return vb->AppendValues(values.data(), N);
}

static std::array<ValueCType, N> GetEntry(const ::arrow::FixedSizeListArray& array,
size_t j) {
using ElementArrayType =
typename TypeTraits<typename stl::ConversionTraits<ValueCType>::ArrowType>::ArrayType;
size_t j) {
using ElementArrayType = typename TypeTraits<
typename stl::ConversionTraits<ValueCType>::ArrowType>::ArrayType;

const ElementArrayType& value_array =
::arrow::internal::checked_cast<const ElementArrayType&>(*array.values());

std::array<ValueCType, N> arr;
for (size_t i = 0; i < N; i++) {
arr[i] =
stl::ConversionTraits<ValueCType>::GetEntry(value_array, array.value_offset(j) + i);
arr[i] = stl::ConversionTraits<ValueCType>::GetEntry(value_array,
array.value_offset(j) + i);
}
return arr;
}
Expand Down

0 comments on commit a2c702b

Please sign in to comment.