Skip to content

Support explicit primary keys for YDB table creation - #266

Merged
KirillKurdyukov merged 3 commits into
mainfrom
codex/c02-create-primary-key
Sep 20, 2026
Merged

KirillKurdyukov merged 3 commits into
mainfrom
codex/c02-create-primary-key

Conversation

@KirillKurdyukov

@KirillKurdyukov KirillKurdyukov commented Sep 20, 2026 •

Copy link
Copy Markdown
Collaborator

YDB requires a primary key when creating a table. Add the ordered primary_key table property for production CREATE TABLE and CREATE TABLE AS, using the standard JDBC table-properties provider. No hidden key column is added.

Reject missing, empty, duplicate, null-element, and unknown key definitions with INVALID_TABLE_PROPERTY. Read the key order from JDBC metadata for SHOW CREATE TABLE. Add production-client tests for composite keys, CTAS, invalid properties, and cleanup after failed CTAS, while preserving the inherited test fixtures.

Validation: head 65ba286 passed independent source review, JDK 25 clean compile/testCompile, and the ordinary full CI run 35532456276. mvn --batch-mode --update-snapshots -Dstyle.color=always clean test completed with 311 tests: 226 passed, 85 skipped, 0 failures, 0 errors. The new production class passed all 4 checks (3 feature tests plus a framework check); inherited smoke/connector results remain 222 passed and 85 skipped. The workflow is unchanged. Local Docker/Colima remains unavailable.

The complete diff against main is 197 additions and 2 deletions across 8 files.

CTAS tests use insert.non-transactional-insert.enabled=true; transactional staging support is not established by these tests. The three added production tests are separate from inherited connector coverage.

@KirillKurdyukov
KirillKurdyukov marked this pull request as ready for review September 20, 2026 19:34
@KirillKurdyukov
KirillKurdyukov enabled auto-merge (squash) September 20, 2026 19:35
@KirillKurdyukov
KirillKurdyukov merged commit 2e60bf8 into main Sep 20, 2026
1 check passed
@KirillKurdyukov
KirillKurdyukov deleted the codex/c02-create-primary-key branch September 20, 2026 19:41
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