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

Method CastTo

cpp/src/arrow/scalar.cc:1434–1439  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

MakeNullScalarFunction · 0.85
FinishMethod · 0.45

Tested by

no test coverage detected