| 1428 | } // namespace |
| 1429 | |
| 1430 | Result<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 | |
| 1437 | void PrintTo(const Scalar& scalar, std::ostream* os) { *os << scalar.ToString(); } |
| 1438 |
nothing calls this directly
no test coverage detected