Named key references in CONCAT(K)/JOIN(K): CONCAT(0, 'A'), JOIN('k') - #3
Merged
Conversation
…te names A key attribute name is resolved per record (via assoc) to the position of the item carrying that attribute, so drop_K and compat_K apply to the resolved positions and the semantics of the operations is unchanged; positional keys behave exactly as before. ActionSpec.keyPositions -> key: RecordKey, with the Set<Integer> constructor, keyPositions() and the int/Set factories kept as delegates. Serializer: positions ascending, then names sorted, single-quoted. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Grammar: keyRef : INT | STRING in concatOp/joinOp; an empty name is a compile error. Embedded DSL: concat/join(String keyName, ...) and (RecordKey, ...). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ive, curated named_key) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
KofCONCAT(K)/JOIN(K)may now list attribute names besides 0-based positions:CONCAT(0, 1, 'A', 'B'),JOIN('Year'), mixed in any order. A name is resolved per record (viaassoc) to the position of the item carrying that attribute, so the key no longer depends on the order of the fields. Semantics of the operations is unchanged; positional keys behave exactly as before.RecordKey(positions, names);ActionSpec.key(),concat/join(String | RecordKey, …)factories (ATP and embedded DSL). TheSet<Integer>constructor,keyPositions()and theint/Set<Integer>factories are kept as delegates.keyRef : INT | STRING;CONCAT('')is a compile error. Canonical form: positions ascending, then names sorted, single-quoted.concat_named_key,join_named_key, negativeconcat_empty_key_name, curated extranamed_key; the 152 existing positive pairs are unchanged.rtl-reference,api,model/itm,model/atp,examples,embedded-rtl) and CHANGELOG[Unreleased].Closes TODO #1 (plan
RTL_NAMED_RECORD_KEY). The manuscript is intentionally untouched (K over positions only); the difference is noted indocs/model/itm.md.Test plan
mvn clean testgreen (incl. newWorkingStateConcatTest/WorkingStateJoinTestnamed-key cases,RtlCompilerTestparse + round-trip, conformance suites, corpus freshness)mkdocs build --strictclean🤖 Generated with Claude Code