| 136 | |
| 137 | |
| 138 | TDataProviderPtr NCB::LinesFileSampleByIndices(const TDataProviderSampleParams& params, TConstArrayRef<ui32> indices) { |
| 139 | TVector<ui64> sortedIndices(indices.begin(), indices.end()); |
| 140 | Sort(sortedIndices); |
| 141 | |
| 142 | const auto& datasetReadingParams = params.DatasetReadingParams; |
| 143 | |
| 144 | auto indexedDataReader = MakeHolder<TIndexedSubsetLineDataReader>( |
| 145 | GetLineDataReader( |
| 146 | datasetReadingParams.PoolPath, |
| 147 | datasetReadingParams.ColumnarPoolFormatParams.DsvFormat, |
| 148 | /*keepInOrder*/ true |
| 149 | ), |
| 150 | std::move(sortedIndices) |
| 151 | ); |
| 152 | |
| 153 | return DataProviderSamplerReorderByIndices( |
| 154 | params, |
| 155 | ReadDatasetForSampler(params, /*loadSampleIds*/false, std::move(indexedDataReader)), |
| 156 | indices |
| 157 | ); |
| 158 | } |
| 159 | |
| 160 | TDataProviderPtr NCB::DataProviderSamplerReorderBySampleIds( |
| 161 | const TDataProviderSampleParams& params, |
nothing calls this directly
no test coverage detected