@@ -40,9 +40,7 @@ bool IsFixedWidthLike(const ArraySpan& source, bool force_null_count,
4040 });
4141}
4242
43- namespace internal {
44-
45- int64_t FixedWidthInBytesFallback (const FixedSizeListType& fixed_size_list_type) {
43+ static int64_t FixedWidthInBytesFallback (const FixedSizeListType& fixed_size_list_type) {
4644 auto * fsl = &fixed_size_list_type;
4745 int64_t list_size = fsl->list_size ();
4846 for (auto type = fsl->value_type ().get ();;) {
@@ -62,8 +60,6 @@ int64_t FixedWidthInBytesFallback(const FixedSizeListType& fixed_size_list_type)
6260 return -1 ;
6361}
6462
65- } // namespace internal
66-
6763int64_t FixedWidthInBytes (const DataType& type) {
6864 auto type_id = type.id ();
6965 if (is_fixed_width (type_id)) {
@@ -72,7 +68,7 @@ int64_t FixedWidthInBytes(const DataType& type) {
7268 }
7369 if (type_id == Type::FIXED_SIZE_LIST ) {
7470 auto & fsl = ::arrow::internal::checked_cast<const FixedSizeListType&>(type);
75- return internal:: FixedWidthInBytesFallback (fsl);
71+ return FixedWidthInBytesFallback (fsl);
7672 }
7773 return -1 ;
7874}
@@ -148,6 +144,8 @@ Status PreallocateFixedWidthArrayData(::arrow::compute::KernelContext* ctx,
148144 return Status::Invalid (" PreallocateFixedWidthArrayData: Invalid type: " , *type);
149145}
150146
147+ } // namespace internal
148+
151149// / \pre same as OffsetPointerOfFixedWidthValues
152150// / \pre source.type->id() != Type::BOOL
153151static const uint8_t * OffsetPointerOfFixedWidthValuesFallback (const ArraySpan& source) {
@@ -181,8 +179,6 @@ static const uint8_t* OffsetPointerOfFixedWidthValuesFallback(const ArraySpan& s
181179 return value_width < 0 ? nullptr : array->GetValues <uint8_t >(1 , offset_in_bytes);
182180}
183181
184- } // namespace internal
185-
186182const uint8_t * OffsetPointerOfFixedWidthValues (const ArraySpan& source) {
187183 auto type_id = source.type ->id ();
188184 if (is_fixed_width (type_id)) {
@@ -194,7 +190,7 @@ const uint8_t* OffsetPointerOfFixedWidthValues(const ArraySpan& source) {
194190 }
195191 return source.GetValues <uint8_t >(1 , 0 ) + source.offset * source.type ->byte_width ();
196192 }
197- return internal:: OffsetPointerOfFixedWidthValuesFallback (source);
193+ return OffsetPointerOfFixedWidthValuesFallback (source);
198194}
199195
200196// / \brief Get the mutable pointer to the fixed-width values of an array
0 commit comments