Skip to content

[cross-schema] Wire secondary-schema stores into the execution context at connection time - #4444

Draft
arnaud-lacurie wants to merge 2 commits into
apple/arnaud-lacurie/cross-schema/pr2from
apple/arnaud-lacurie/cross-schema/pr3
Draft

[cross-schema] Wire secondary-schema stores into the execution context at connection time#4444
arnaud-lacurie wants to merge 2 commits into
apple/arnaud-lacurie/cross-schema/pr2from
apple/arnaud-lacurie/cross-schema/pr3

Conversation

@arnaud-lacurie

@arnaud-lacurie arnaud-lacurie commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • RecordStoreAndRecordContextTransaction now carries a map of secondary FDBRecordStoreBase instances keyed by schema name, populated by the connection layer when a cross-schema query is prepared
  • TransactionBoundDatabase.loadRecordStore(schemaId) looks up the secondary store map before falling back to the primary store, so RecordQueryStoreBindingPlan.executePlan finds the correct store at runtime
  • BackingRecordStore.fromTransactionAndStore factory method to construct a BackingRecordStore wrapping an existing FDBRecordStoreBase

Test plan

  • Cross-schema join queries return correct results end-to-end
  • Single-schema queries unaffected (secondary store map is empty)

@arnaud-lacurie arnaud-lacurie added the enhancement New feature or request label Aug 14, 2026
@arnaud-lacurie
arnaud-lacurie force-pushed the apple/arnaud-lacurie/cross-schema/pr3 branch from 1100028 to f32e4bc Compare August 14, 2026 16:48
@arnaud-lacurie arnaud-lacurie changed the title Wire secondary-schema stores into the execution context at connection time (cross-schema 3/6) [cross-schema] Wire secondary-schema stores into the execution context at connection time Aug 14, 2026
… time

TransactionBoundDatabase now populates storesBySchemaName from the
additional stores map on RecordStoreAndRecordContextTransaction, so that
loadRecordStore(schemaId) can return the secondary FDBRecordStoreBase
that RecordQueryStoreBindingPlan looks up at execution time.
Checkstyle/PMD RedundantImport: already imported above.
@arnaud-lacurie
arnaud-lacurie force-pushed the apple/arnaud-lacurie/cross-schema/pr3 branch from f32e4bc to 88e6a54 Compare August 14, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant