GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |
GeezerVison is showing github.com — bindings: Decimal SQL parameters keep every digit, datetime/date parameters bind, datetimes keep microseconds (#58) by tae898 · Pull Request #59 · humemai/arcadedb-embedded-python
This repository was archived by the owner on Nov 21, 2026. It is now read-only.
Conversation
|
|
On hold, not to merge on green. Passing a Python Engine side filed as ArcadeData#8885 (a one-line |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…meters bind, datetimes keep microseconds (#58) - Positional SQL parameters: Decimal, date, and datetime go through convert_python_to_java. Left to JPype, a Decimal reached the engine as a Double (38 digits stored as 1.2345678901234567E+19, and a lookup by the same Decimal missed the exact rows), and a date or datetime matched no overload. - A datetime converts to the UTC LocalDateTime of its instant, with its microseconds. The java.util.Date it used to build kept milliseconds, so DATETIME_MICROS and DATETIME_NANOS lost the rest and never matched their own value. The instant is unchanged: a naive value is still local time, as datetime.timestamp() reads it. - Tests that fail on the previous wheel: test_decimal_parameter_keeps_every_digit, test_datetime_and_date_parameters. Full suite 491 passed, 3 skipped; bandit clean. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01WWcDr7TwvcfMsQkeYQVHZr
…t passes on a UTC host (#58) On a UTC machine the naive and the aware datetime are the same instant, so a lookup by either finds all four rows; CI runs in UTC and failed on every platform. The expected rows are now those whose instant equals the value's. Passes under TZ=UTC, Asia/Seoul, and America/New_York; full suite under UTC: 491 passed, 3 skipped. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01WWcDr7TwvcfMsQkeYQVHZr
…ed on every host (#58) The engine stores DATETIME as a UTC wall clock whatever the JVM's or the database's time zone (a LocalDateTime 12:34, an Instant 12:34Z and the string '12:34' all store 12:34Z, measured under TZ=UTC and Asia/Seoul with the database zone set to Asia/Seoul). A naive datetime was read as local time, so 12:34 written on a UTC+9 host read back as 03:34. It is now that wall clock as it stands; an aware datetime is still converted to UTC and keeps its instant. The test writes a naive 12:34:56.789123 and an aware 21:34:56.789123+09:00 through set() and a parameter, and checks that all four read back as the naive value with epoch 12:34:56.789Z and that a lookup by either finds all four. It fails on the previous code under TZ=Asia/Seoul (12:34 read back as 03:34) and passes on this one under UTC, Asia/Seoul and America/New_York; the full suite passes under UTC and Asia/Seoul (491 passed, 3 skipped). Docs: the type-conversion notes state the rule, and the examples that store the current time use datetime.now(timezone.utc). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01WWcDr7TwvcfMsQkeYQVHZr
68279eb to
4b27091
Compare
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
bindings: Decimal SQL parameters lose digits, datetime/date parameters are refused, datetimes lose microseconds
There was an error while loading. Please reload this page.