Repository navigation
Conversation
Map TIME_WITH_TIMEZONE to OffsetTime and TIMESTAMP_WITH_TIMEZONE to OffsetDateTime, parse ISO-8601 offset text, and reject unlisted getters on the new declared types.
Assert Z and +01:00 parse to OffsetTime and OffsetDateTime, malformed offset text raises SQLException, and declared offset columns return the offset classes.
Add the missing B-6 getObject cells for TIME_WITH_TIMEZONE and TIMESTAMP_WITH_TIMEZONE to the server suite.
|
Verdict: CLEAN at 3d11c0c. Base Ten lanes PASS at the verdict head. Transcripts are under
Units are 1,505 tests, 586 failures, 0 errors, all in the Appendix B read suite. B-1 stays at 3, B-3 at 3, B-5 at 0, and every offset cell passes. Spotless is clean. The integration suite is 148 tests, 22 failures, with no offset mention; the remainder is the PR-5 unsupported-type work. Perf is PASS. Over 100,000 calls, offset parsing is 2.6 microseconds at p99 and offset serialization is 0.7 microseconds, both far below the 20 microsecond budget. The timestamp control at the head is 2.6 microseconds against 3.1 at trunk, so it did not regress. The PR also rejects non- CI is red only where Appendix B is red, by design. No review-bot comments to triage. STACK-READY. PR-5 branches from this head. |
|
Verdict correction, lane evidence. Lanes 2 through 6 were first captured with an intermediate probe. One transcript showed |
## Why The driver mapped result values by storage class, so the declared type did not control metadata or `getObject`, and `setObject` ignored the target type. JDBC 4.3 Appendix B is the oracle. Seven stacked pull requests implement it. The stack cannot land link by link because the `main` ruleset requires the full build green at every head, and the Appendix B oracle is red until the last link. This PR lands the verified tip as one commit. ## What changed - Add the Appendix B oracle suite and the vendor table, then resolve one JDBC type per declared column for metadata and `getObject`. - Honor the `setObject` target type, add the missing getters and LOB wrappers, and support the offset temporal types. - Mark `ARRAY`, `STRUCT`, `REF`, `JAVA_OBJECT`, and `DISTINCT` N/A and reject unlisted Table B-6 conversions. - Publish the compliance profile, quarantine the four xerial tests that conflict with the spec, and record the policy. ## Scope The seven stacked PRs are #239, #240, #241, #242, #243, #244, and #245. No unrelated changes. `vendor/JDBC4-TYPE-MAPPING.md` is the oracle. ## Tradeoffs - The five unrepresentable types throw instead of emulating them. - The conformance quarantine is method-level. The lost checks are named in `libsql-conformance/README.md`. - An expression column with no `decltype` keeps the storage fallback, documented as a profile exception. ## Blast Radius Metadata and `getObject` now follow the declared type, so a `BIGINT` holding 42 returns `Long`, and an unlisted getter conversion throws. The default build was red from #239 through #245 by design and is green at this tip. ## Verification - `clean verify` at `0861960`: 2,006 tests, 0 failures, 7 skipped, about 63 seconds. - Appendix B unit 1,050 of 1,050, integration 148 of 148, conformance 270 of 270 with 7 skipped. - Clean clone at the same SHA: unit 1,510 of 1,510, integration 148 of 148. - Each link has a verdict and ten live lanes. The verdict comments are on #239 through #245.
Why
JDBC 4.3 Appendix B names
TIME_WITH_TIMEZONEandTIMESTAMP_WITH_TIMEZONEin Tables B-4, B-5, and B-6, but the driver had no declared-type entry for either. A declared offset column fell back to storage-class handling andgetObjectreturned text instead of the Java offset types.What changed
TIME_WITH_TIMEZONEtoOffsetTimeandTIMESTAMP_WITH_TIMEZONEtoOffsetDateTimein the declared-type registry.getObject(int)andgetObject(int, Class); accept bothZand numeric offsets.OffsetTimeandOffsetDateTimeas ISO-8601 text in the no-target and target paths.JdbcValueConverteralready had this from PR-2; it was verified, not rewritten.SQLException.getObjectgetters on the two new declared types, which is what Table B-6 lists for them.Z,+01:00, and malformed offset text, plus declared-column reads and metadata.getObjectcells to the server suite.Scope
Only the PR-4 files:
libsql-jdbc/src/main/java/com/github/magnusp/libsql/jdbc/JdbcTypeMapping.javalibsql-jdbc/src/main/java/com/github/magnusp/libsql/jdbc/LibsqlResultSet.javalibsql-jdbc/src/test/java/com/github/magnusp/libsql/jdbc/Jdbc4AppendixBReadTest.javalibsql-itests/src/test/java/com/github/magnusp/libsql/itest/Jdbc4AppendixBTypeMappingIT.javaLocal date and time paths are unchanged. The Appendix B oracle was not weakened.
Tradeoffs
OffsetDateTimeaccepts both the ISO-8601Tseparator and the SQLite space separator. Strict ISO-8601 parsing alone would reject the text form the existing B-6 fixture uses.getObject, per Table B-6. The rest of the unlisted-cell matrix remains PR-5's strict-conversion work; this PR applies that rule only to the two new types so every offset cell is green.getObject(int, Class)parses offset text regardless of declared type, matching the existing temporal getter behavior.Blast Radius
TIME_WITH_TIMEZONEandTIMESTAMP_WITH_TIMEZONEcolumns now resolve to offset classes ingetObject,getColumnType, andgetColumnClassName.Verification
./mvnw -q -pl libsql-jdbc -Dtest='Jdbc4AppendixBReadTest#b6GetterHonoursSupportedJdbcTypes' -Dsurefire.failIfNoSpecifiedTests=false testARRAY,REF) and 577 unlisted-cell failures, both deferred to PR-5../mvnw -q -pl libsql-jdbc testJdbc4AppendixBReadTest; no non-Appendix-B failure../mvnw -q spotless:checklibsql-hrana-codec,libsql-client,libsql-jdbc, then ranJdbc4AppendixBTypeMappingITagainst sqld.ARRAY/STRUCT/REF/JAVA_OBJECTand pre-existing B-2/B-5 gaps.Ready for review; not merged and not retargeted.