Skip to content

Bind YDB temporal values using native JDBC types - #265

Merged
KirillKurdyukov merged 4 commits into
mainfrom
codex/trino-timestamp-millis
Sep 14, 2026
Merged

KirillKurdyukov merged 4 commits into
mainfrom
codex/trino-timestamp-millis

Conversation

@KirillKurdyukov

@KirillKurdyukov KirillKurdyukov commented Sep 14, 2026 •

Copy link
Copy Markdown
Collaborator

Select temporal parameter writers from each existing column's native JDBC TYPE_NAME instead of relying on forceSignedDatetimes. Bind values and NULL with the matching vendor SQL type code. New Trino date and timestamp(3)/(6) columns use Date32 and Timestamp64.

YdbColumnMappings contains the six temporal SQL-code constants, native date/timestamp column mappings and write functions; YdbClient selects mappings and DDL types. Date writers pass epoch days, Datetime writers pass epoch seconds, and Timestamp writers use Instant to preserve microseconds. Remove the connector's forceSignedDatetimes override and retain standard readers. The explicit unsupported time/zoned-timestamp filter preserves selection across all 29 upstream Trino483 datasets, including the negative CHAR contract.

Head f0639955bd9fb0ec403963a78717f42432c97601: five files, +105/-46 = 151 changed lines. The extraction preserves all six constant values and all five method bodies. JDK25 compilation passed (14 production and 5 test sources). Independent exact source and runtime-log reviews approved.

Fresh ordinary full CI passed on Temurin25.0.4:307 tests,222 passed,85 skipped,0 failures/errors. Tested merge 0d26aea64dbd14770d2393dff243303b9d185e2b combines this exact head with base 469d559cf9210ee3babe8fdcc01b1988035fedd1. Three original date sets, two timestamp(3), two timestamp(6) and CHAR negative case remain covered. Workflow unchanged.

Existing-column metadata reaches ordinary INSERT, predicates, direct UPDATE and MERGE INSERT. Standard generic MERGE UPDATE/DELETE handles omit native JDBC types; described driver paths may recover the target type. Mixed-family and non-UTC compatibility remain unverified: the local Docker API and default Colima VM SSH are unavailable, so the separate mixed-schema diagnostic has not run. Legacy Date range behavior is unchanged.

@KirillKurdyukov
KirillKurdyukov marked this pull request as ready for review September 14, 2026 13:35
@KirillKurdyukov

KirillKurdyukov commented Sep 14, 2026 •

Copy link
Copy Markdown
Collaborator Author

PR #265 is ready for review, position1/1. Head f0639955bd9fb0ec403963a78717f42432c97601, five files,+105/-46=151 lines. The requested YdbColumnMappings extraction preserves six temporal SQL-code constants and all five mapping/write method bodies; YdbClient keeps mapping and DDL selection.

Exact source and runtime-log reviews approved; JDK25 compile/test-compile passed14production+5test. Fresh ordinary full CI:307 total,222 passed,85 skipped,0 failures/errors. Original date/timestamp and CHAR negative contracts remain covered. No second review mention is sent.

The separate mixed-schema diagnostic remains unrun because the local Docker/Colima environment is unavailable.

@KirillKurdyukov
KirillKurdyukov marked this pull request as draft September 14, 2026 13:41
@KirillKurdyukov KirillKurdyukov changed the title Support Trino timestamp(3) writes Bind YDB temporal values using native JDBC types Sep 14, 2026
@KirillKurdyukov
KirillKurdyukov marked this pull request as ready for review September 14, 2026 14:01
@KirillKurdyukov
KirillKurdyukov marked this pull request as draft September 14, 2026 14:47
@KirillKurdyukov
KirillKurdyukov marked this pull request as ready for review September 14, 2026 14:56
@KirillKurdyukov
KirillKurdyukov marked this pull request as draft September 14, 2026 15:01
@KirillKurdyukov
KirillKurdyukov marked this pull request as ready for review September 14, 2026 15:11
@KirillKurdyukov
KirillKurdyukov merged commit 132c05f into main Sep 14, 2026
1 check passed
@KirillKurdyukov
KirillKurdyukov deleted the codex/trino-timestamp-millis branch September 14, 2026 15:13
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