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

Function type_singleton

cpp/src/arrow/type.cc:3556–3566  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3554}
3555
3556Result<std::shared_ptr<DataType>> type_singleton(Type::type id) {
3557 auto visit = [](auto type) -> Result<std::shared_ptr<DataType>> {
3558 using T = std::decay_t<decltype(*type)>;
3559 if constexpr (TypeTraits<T>::is_parameter_free) {
3560 return TypeTraits<T>::type_singleton();
3561 }
3562 return Status::TypeError("Type ", internal::ToString(T::type_id),
3563 " is not a parameter-free type");
3564 };
3565 return VisitTypeId(id, visit);
3566}
3567
3568} // 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
CheckTableToTensorFunction · 0.70
TYPED_TEST_PFunction · 0.70
BatchToTensorSimpleFunction · 0.70
TableToTensorSimpleFunction · 0.70

Calls 3

VisitTypeIdFunction · 0.85
TypeErrorFunction · 0.70
ToStringFunction · 0.70

Tested by 15

TYPED_TEST_PFunction · 0.56
CheckTableToTensorFunction · 0.56
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