@@ -20,7 +20,10 @@ std::vector<NKikimr::NOlap::TWritePortionInfoWithBlobsResult> TMerger::Execute(c
2020 arrow::FieldVector indexFields;
2121 indexFields.emplace_back (IColumnMerger::PortionIdField);
2222 indexFields.emplace_back (IColumnMerger::PortionRecordIndexField);
23- IIndexInfo::AddSpecialFields (indexFields);
23+ if (resultFiltered->HasColumnId ((ui32)IIndexInfo::ESpecialColumn::DELETE_FLAG)) {
24+ IIndexInfo::AddDeleteFields (indexFields);
25+ }
26+ IIndexInfo::AddSnapshotFields (indexFields);
2427 auto dataSchema = std::make_shared<arrow::Schema>(indexFields);
2528 NArrow::NMerger::TMergePartialStream mergeStream (
2629 resultFiltered->GetIndexInfo ().GetReplaceKey (), dataSchema, false , IIndexInfo::GetSnapshotColumnNames ());
@@ -137,7 +140,7 @@ std::vector<NKikimr::NOlap::TWritePortionInfoWithBlobsResult> TMerger::Execute(c
137140 TGeneralSerializedSlice slice (dataWithSecondary.GetExternalData (), schemaDetails, Context.Counters .SplitterCounters );
138141
139142 auto b = batchResult->Slice (recordIdx, slice.GetRecordsCount ());
140- const ui32 deletionsCount = IIndexInfo::CalcDeletions (b, true );
143+ const ui32 deletionsCount = IIndexInfo::CalcDeletions (b, false );
141144 auto constructor = TWritePortionInfoWithBlobsConstructor::BuildByBlobs (slice.GroupChunksByBlobs (groups),
142145 dataWithSecondary.GetSecondaryInplaceData (), pathId, resultFiltered->GetVersion (), resultFiltered->GetSnapshot (),
143146 SaverContext.GetStoragesManager ());
0 commit comments