| 855 | } |
| 856 | |
| 857 | NCB::NIdl::TPoolMetainfo NCB::LoadPoolMetainfo(const TStringBuf path) { |
| 858 | const auto file = TBlob::FromFile(TString(path)); |
| 859 | const TConstArrayRef<ui8> blob(file.AsUnsignedCharPtr(), file.Size()); |
| 860 | TPoolMetainfo poolMetainfo; |
| 861 | auto parseMetainfo = [&] (TConstArrayRef<ui8> bytes) { |
| 862 | const auto poolMetainfoParsed = poolMetainfo.ParseFromArray(bytes.data(), bytes.size()); |
| 863 | CB_ENSURE(poolMetainfoParsed); |
| 864 | }; |
| 865 | ParseQuantizedPool( |
| 866 | parseMetainfo, |
| 867 | /*parseSchema*/ Nothing(), |
| 868 | /*parseColumn*/ Nothing(), |
| 869 | /*parseChunk*/ Nothing(), |
| 870 | blob); |
| 871 | return poolMetainfo; |
| 872 | } |
| 873 | |
| 874 | |
| 875 | namespace NCB { |
nothing calls this directly
no test coverage detected