| 205 | } |
| 206 | |
| 207 | Result<std::shared_ptr<CastFunction>> GetCastFunction(const DataType& to_type) { |
| 208 | internal::EnsureInitCastTable(); |
| 209 | auto it = internal::g_cast_table.find(static_cast<int>(to_type.id())); |
| 210 | if (it == internal::g_cast_table.end()) { |
| 211 | return Status::NotImplemented("Unsupported cast to ", to_type); |
| 212 | } |
| 213 | return it->second; |
| 214 | } |
| 215 | |
| 216 | } // namespace internal |
| 217 |
no test coverage detected