You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[ntuple] Union merging can corrupt a late class field when its dictionary differs from the file #23683
In Union mode, a class field first appearing in a later source is reconstructed from the currently loaded dictionary. The merger then pairs source and destination child fields by position. A differing dictionary can therefore cause a successful merge to copy member pages to the wrong destination members.
Reproduction shape:
In a process declaring struct Rec { int fA = 11; int fC = 33; };, write one RNTuple with only an integer e and another with e and a Rec field called record.
In a separate process, declare struct Rec { int fA = 11; int fB = 22; int fC = 33; };.
Union-merge the file containing only e first, followed by the file containing record.
Expected: preserve the on-disk member layout or reject the incompatible schema cleanly.
Observed in a release build: the merge reports success, record.fB receives the source fC data and record.fC reads zero. Reordering members can also swap values; removal can throw an exception out of Merge. This predates #23646, which fixes a different late-field truncation/quantization problem.
A focused fix preflights newly reconstructed fields before adding them to the destination model and uses the existing Abort/Skip policy for mismatches. Schema conversion is a separate design question. Investigation and the proposed implementation used Codex and an independent native Claude Code review.
Activity