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

Function ContainsFloatType

cpp/src/arrow/chunked_array.cc:104–117  ·  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

102
103// Check whether the type or any of its children is a float type.
104bool ContainsFloatType(const DataType& type) {
105 if (is_floating(type.id())) {
106 return true;
107 } else {
108 // Check if any nested field contains a float type.
109 for (const auto& field : type.fields()) {
110 if (ContainsFloatType(*field->type())) {
111 return true;
112 }
113 }
114 }
115 // No float types are observed
116 return false;
117}
118
119} // namespace
120

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