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

Function ContainsFloatType

cpp/src/arrow/chunked_array.cc:112–125  ·  view source on GitHub ↗

Check whether the type or any of its children is a float type.

Source from the content-addressed store, hash-verified

110
111// Check whether the type or any of its children is a float type.
112bool ContainsFloatType(const DataType& type) {
113 if (is_floating(type.id())) {
114 return true;
115 } else {
116 // Check if any nested field contains a float type.
117 for (const auto& field : type.fields()) {
118 if (ContainsFloatType(*field->type())) {
119 return true;
120 }
121 }
122 }
123 // No float types are observed
124 return false;
125}
126
127} // namespace
128

Callers 1

EqualsMethod · 0.85

Calls 4

is_floatingFunction · 0.70
idMethod · 0.45
fieldsMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected