Problem
BuildRecordValue passes each IDataReader.GetName(i) value to RecordValue.Set.
When the reader exposes duplicate column names, the later value replaces the earlier value in the backing dictionary. This silently loses data.
Expected behavior
Validate column names before calling RecordValue.Set and reject duplicate names explicitly.
A duplicate column name should throw a FormatException rather than overwrite an existing field.
Acceptance criteria
- Duplicate names returned by
IDataReader.GetName(i) are detected before values are inserted into the record.
- A duplicate name raises
FormatException.
- Existing behavior for unique column names remains unchanged.
- Add a reader-normalization regression test using duplicate
GetName values.
Problem
BuildRecordValuepasses eachIDataReader.GetName(i)value toRecordValue.Set.When the reader exposes duplicate column names, the later value replaces the earlier value in the backing dictionary. This silently loses data.
Expected behavior
Validate column names before calling
RecordValue.Setand reject duplicate names explicitly.A duplicate column name should throw a
FormatExceptionrather than overwrite an existing field.Acceptance criteria
IDataReader.GetName(i)are detected before values are inserted into the record.FormatException.GetNamevalues.