| 27 | } |
| 28 | |
| 29 | std::optional<DateTime64> getVersion(ContextPtr context, const StatsTableIdentifier & table) |
| 30 | { |
| 31 | try |
| 32 | { |
| 33 | auto obj = getTableStatistics(context, table); |
| 34 | if (!obj) |
| 35 | return std::nullopt; |
| 36 | return obj->getTimestamp(); |
| 37 | } |
| 38 | catch (...) |
| 39 | { |
| 40 | tryLogCurrentException(&Poco::Logger::get("Statistics::getVersion")); |
| 41 | return std::nullopt; |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | } |
no test coverage detected