Skip to content

Comments

feat: add composite primary key support#9

Open
PierreZ wants to merge 1 commit intodatafusion-contrib:mainfrom
PierreZ:complex_pk
Open

feat: add composite primary key support#9
PierreZ wants to merge 1 commit intodatafusion-contrib:mainfrom
PierreZ:complex_pk

Conversation

@PierreZ
Copy link
Collaborator

@PierreZ PierreZ commented Feb 20, 2026

Replace the single-column __row_id__ design with composite primary key support. All columns in Index::index_schema() are now treated as the composite primary key, enabling multi-column key lookups.

Key changes:

  • create_index_schema() accepts impl IntoIterator<Item = Field>
  • create_plan_properties_for_pk_scan() replaces row_id-specific variant
  • AND joins operate on all PK columns with Projection to deduplicate
  • OR dedup uses GROUP BY on all PK columns
  • Return proper errors instead of silent fallbacks in join column lookup
  • Use full Field equality in project_to_pk_schema()
  • Align README and rustdoc with composite PK terminology
  • Fix unresolved UnionExec rustdoc links
  • Suppress false-positive dead_code warnings in shared test helpers
  • Add composite PK integration tests with multi-tenant example

Replace the single-column `__row_id__` design with composite primary key
support. All columns in `Index::index_schema()` are now treated as the
composite primary key, enabling multi-column key lookups.

Key changes:
- `create_index_schema()` accepts `impl IntoIterator<Item = Field>`
- `create_plan_properties_for_pk_scan()` replaces row_id-specific variant
- AND joins operate on all PK columns with Projection to deduplicate
- OR dedup uses `GROUP BY` on all PK columns
- Return proper errors instead of silent fallbacks in join column lookup
- Use full Field equality in `project_to_pk_schema()`
- Align README and rustdoc with composite PK terminology
- Fix unresolved `UnionExec` rustdoc links
- Suppress false-positive dead_code warnings in shared test helpers
- Add composite PK integration tests with multi-tenant example

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant