Skip to content

feat: add composite primary key support#9

Merged
PierreZ merged 1 commit into
datafusion-contrib:mainfrom
PierreZ:complex_pk
Feb 23, 2026
Merged

feat: add composite primary key support#9
PierreZ merged 1 commit into
datafusion-contrib:mainfrom
PierreZ:complex_pk

Conversation

@PierreZ
Copy link
Copy Markdown
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 <[email protected]>
@PierreZ PierreZ merged commit 0e2f1b6 into datafusion-contrib:main Feb 23, 2026
4 checks passed
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