| 1432 | } // namespace |
| 1433 | |
| 1434 | Result<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 | |
| 1441 | void PrintTo(const Scalar& scalar, std::ostream* os) { *os << scalar.ToString(); } |
| 1442 |
nothing calls this directly
no test coverage detected