Skip to content

Key the index-entry-to-record translation by SQL field name - #4760

Merged
hatyo merged 7 commits into
mainfrom
apple/hatyo/index-entry-mangled-names
Nov 10, 2026
Merged

hatyo merged 7 commits into
mainfrom
apple/hatyo/index-entry-mangled-names

Conversation

@hatyo

@hatyo hatyo commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

IndexEntryToRecordValueHelper was filled with record descriptor field names but looked up by the SQL names of the base record type, so columns with escaped identifiers read NULL. It is now filled with the SQL names, and FieldValue exposes the name and the storage name separately.

The translation has no consumer yet, so the new unit test is the only coverage.

Fixes #4758.

IndexEntryToRecordValueHelper was filled with record descriptor field names but
drained by the SQL names of the base record type, so every column of a table with
an escaped identifier read NULL. Fill it with the SQL names instead, and make the
name/storage-name distinction explicit on FieldValue.

Fixes #4758
@hatyo hatyo added bug fix Change that fixes a bug Run mixed-mode Label to add to Pull Requests to have it run mixed mode tests labels Oct 19, 2026
@hatyo
hatyo requested a review from robert-brunel October 19, 2026 14:04
@hatyo
hatyo marked this pull request as ready for review October 19, 2026 14:04
hatyo added 4 commits October 23, 2026 14:55
Rename the FieldValue getters that return record descriptor names to
get...StorageName...(), drop the getLastField*Name() shortcuts in favour of
getFieldPath(), and document SQL vs storage spelling on each getter.

Replace IndexEntryToRecordValueMangledNameTest with a case in
IndexEntryTranslatorEquivalenceTest that drives computeIndexEntryToLogicalRecord
over a descriptor with escaped field names.
@robert-brunel
robert-brunel self-requested a review November 2, 2026 10:27
@hatyo
hatyo merged commit b67a8bf into main Nov 10, 2026
23 checks passed
@hatyo
hatyo deleted the apple/hatyo/index-entry-mangled-names branch November 10, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix Change that fixes a bug Run mixed-mode Label to add to Pull Requests to have it run mixed mode tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Index-entry-to-record translation reads all nulls when a SQL identifier had to be escaped

2 participants