File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -961,8 +961,16 @@ ROOT::Internal::RClusterDescriptorBuilder::AddExtendedColumnRanges(const RNTuple
961961 // `ROOT::RFieldBase::EntryToColumnElementIndex()`, i.e. it is a principal column reachable from the
962962 // field zero excluding subfields of collection and variant fields.
963963 if (c.IsDeferredColumn ()) {
964- columnRange.SetFirstElementIndex (fCluster .GetFirstEntryIndex () * nRepetitions);
965- columnRange.SetNElements (fCluster .GetNEntries () * nRepetitions);
964+ if (c.GetRepresentationIndex () == 0 ) {
965+ columnRange.SetFirstElementIndex (fCluster .GetFirstEntryIndex () * nRepetitions);
966+ columnRange.SetNElements (fCluster .GetNEntries () * nRepetitions);
967+ } else {
968+ const auto &field = desc.GetFieldDescriptor (fieldId);
969+ const auto firstReprColumnId = field.GetLogicalColumnIds ()[c.GetIndex ()];
970+ const auto &firstReprColumnRange = fCluster .fColumnRanges [firstReprColumnId];
971+ columnRange.SetFirstElementIndex (firstReprColumnRange.GetFirstElementIndex ());
972+ columnRange.SetNElements (firstReprColumnRange.GetNElements ());
973+ }
966974 if (!columnRange.IsSuppressed ()) {
967975 auto &pageRange = fCluster .fPageRanges [physicalId];
968976 pageRange.fPhysicalColumnId = physicalId;
You can’t perform that action at this time.
0 commit comments