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

Method CastTo

cpp/src/arrow/scalar.cc:1430–1435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1428} // namespace
1429
1430Result<std::shared_ptr<Scalar>> Scalar::CastTo(std::shared_ptr<DataType> to) const {
1431 if (is_valid) {
1432 return ToTypeVisitor{*this, std::move(to)}.Finish();
1433 }
1434 return MakeNullScalar(std::move(to));
1435}
1436
1437void PrintTo(const Scalar& scalar, std::ostream* os) { *os << scalar.ToString(); }
1438

Callers

nothing calls this directly

Calls 2

MakeNullScalarFunction · 0.85
FinishMethod · 0.45

Tested by

no test coverage detected