@@ -471,6 +471,12 @@ struct unwrap<std::vector<T>> {
471471 using type = T;
472472};
473473
474+ template <typename T, int N>
475+ struct unwrap <T[N]> {
476+ using type = T[N];
477+ using base_type = T;
478+ };
479+
474480template <>
475481struct unwrap <bool > {
476482 using type = char ;
@@ -560,15 +566,15 @@ class ColumnIterator : ChunkingPolicy
560566 mLast = mCurrent + array->length () + (mFirstIndex >> SCALE_FACTOR);
561567 }
562568
563- decltype ( auto ) operator *() const
569+ auto operator *() const
564570 requires std::same_as<bool , std::decay_t <T>>
565571 {
566572 checkSkipChunk ();
567573 return (*(mCurrent - (mOffset >> SCALE_FACTOR) + ((*mCurrentPos + mOffset ) >> SCALE_FACTOR)) & (1 << ((*mCurrentPos + mOffset ) & 0x7 ))) != 0 ;
568574 }
569575
570- decltype ( auto ) operator *() const
571- requires ((!std::same_as<bool , std::decay_t <T>>) && std::same_as<arrow_array_for_t <T>, arrow::ListArray>)
576+ auto operator *() const
577+ requires ((!std::same_as<bool , std::decay_t <T>>) && std::same_as<arrow_array_for_t <T>, arrow::ListArray> && !std::same_as< arrow_array_for_t <T>, arrow::FixedSizeListArray> )
572578 {
573579 checkSkipChunk ();
574580 auto list = std::static_pointer_cast<arrow::ListArray>(mColumn ->chunk (mCurrentChunk ));
@@ -577,8 +583,15 @@ class ColumnIterator : ChunkingPolicy
577583 return std::span{mCurrent + mFirstIndex + offset, mCurrent + mFirstIndex + (offset + length)};
578584 }
579585
580- decltype (auto ) operator *() const
581- requires ((!std::same_as<bool , std::decay_t <T>>) && !std::same_as<arrow_array_for_t <T>, arrow::ListArray>)
586+ auto operator *() const
587+ requires ((!std::same_as<bool , std::decay_t <T>>) && !std::same_as<arrow_array_for_t <T>, arrow::ListArray> && std::same_as<arrow_array_for_t <T>, arrow::FixedSizeListArray>)
588+ {
589+ checkSkipChunk ();
590+ return std::span{reinterpret_cast <const unwrap<T>::base_type*>(mCurrent + (*mCurrentPos >> SCALE_FACTOR)), arrow_array_for<T>::width};
591+ }
592+
593+ auto operator *() const
594+ requires ((!std::same_as<bool , std::decay_t <T>>) && !std::same_as<arrow_array_for_t <T>, arrow::ListArray> && !std::same_as<arrow_array_for_t <T>, arrow::FixedSizeListArray>)
582595 {
583596 checkSkipChunk ();
584597 return *(mCurrent + (*mCurrentPos >> SCALE_FACTOR));
0 commit comments