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

Function type_singleton

cpp/src/arrow/type.cc:3551–3561  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3549}
3550
3551Result<std::shared_ptr<DataType>> type_singleton(Type::type id) {
3552 auto visit = [](auto type) -> Result<std::shared_ptr<DataType>> {
3553 using T = std::decay_t<decltype(*type)>;
3554 if constexpr (TypeTraits<T>::is_parameter_free) {
3555 return TypeTraits<T>::type_singleton();
3556 }
3557 return Status::TypeError("Type ", internal::ToString(T::type_id),
3558 " is not a parameter-free type");
3559 };
3560 return VisitTypeId(id, visit);
3561}
3562
3563} // namespace arrow

Callers 15

TYPED_TEST_PFunction · 0.70
NumericScalarMethod · 0.70
DateScalarMethod · 0.70
IntervalScalarMethod · 0.70
scalar.hFile · 0.70
MakeScalarFunction · 0.70
VisitMethod · 0.70
BatchToTensorSimpleFunction · 0.70
type_singletonMethod · 0.70
type_singletonMethod · 0.70
SetUpMethod · 0.70
index_data_typeMethod · 0.70

Calls 3

VisitTypeIdFunction · 0.85
TypeErrorFunction · 0.70
ToStringFunction · 0.70

Tested by 15

TYPED_TEST_PFunction · 0.56
SetUpMethod · 0.56
index_data_typeMethod · 0.56
MakeSparseTensorMethod · 0.56
SetUpMethod · 0.56
TYPED_TEST_PFunction · 0.56
SetUpMethod · 0.56
SetUpMethod · 0.56
MakeSparseCSFIndexMethod · 0.56
MakeSparseTensorMethod · 0.56
TYPED_TESTFunction · 0.56
SetUpMethod · 0.56