MCPcopy Create free account
hub / github.com/apache/arrow / FixedWidthInBytes

Function FixedWidthInBytes

cpp/src/arrow/util/fixed_width_internal.cc:64–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64int64_t FixedWidthInBytes(const DataType& type) {
65 auto type_id = type.id();
66 if (is_fixed_width(type_id)) {
67 const int32_t num_bits = type.bit_width();
68 return (type_id == Type::BOOL) ? -1 : num_bits / 8;
69 }
70 if (type_id == Type::FIXED_SIZE_LIST) {
71 auto& fsl = ::arrow::internal::checked_cast<const FixedSizeListType&>(type);
72 return FixedWidthInBytesFallback(fsl);
73 }
74 return -1;
75}
76
77static int64_t FixedWidthInBitsFallback(const FixedSizeListType& fixed_size_list_type) {
78 auto* fsl = &fixed_size_list_type;

Callers 4

TEST_FFunction · 0.85
PrimitiveFilterImplMethod · 0.85
FixedWidthTakeExecFunction · 0.85
FSLFilterExecFunction · 0.85

Calls 4

is_fixed_widthFunction · 0.85
idMethod · 0.45
bit_widthMethod · 0.45

Tested by 1

TEST_FFunction · 0.68