GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bindings: Decimal SQL parameters lose digits, datetime/date parameters are refused, datetimes lose microseconds · Issue #58 · humemai/arcadedb-embedded-python

This repository was archived by the owner on Nov 21, 2026. It is now read-only.
This repository was archived by the owner on Nov 21, 2026. It is now read-only.

bindings: Decimal SQL parameters lose digits, datetime/date parameters are refused, datetimes lose microseconds #58

Copy link
Copy link
Closed
#59
Closed
bindings: Decimal SQL parameters lose digits, datetime/date parameters are refused, datetimes lose microseconds#58
#59
Copy link

Description

@tae898
tae898
opened on Oct 1, 2026
Issue body actions

Three bindings bugs in how Python values reach the engine, found while checking a DECIMAL round trip (laptop, released 26.9.1 wheel and the current dev wheel alike; Java with the same values stores them exactly, so the engine is not at fault):

  1. A Decimal passed as a positional SQL parameter loses its digits: INSERT INTO T SET dec = ? with Decimal("12345678901234567890.123456789012345678") stores 1.2345678901234567E+19, and WHERE dec = ? with the same Decimal misses the rows that hold it exactly (written through set() or a string). _convert_args leaves scalars to JPype, which turns a Decimal into a Double.
  2. A datetime or date passed as a positional SQL parameter is refused: No matching overloads found for ... LocalDatabase.command(str,str,datetime.datetime).
  3. A Python datetime crosses as a java.util.Date, which keeps milliseconds: a DATETIME_MICROS or DATETIME_NANOS property set to ...56.789123 stores ...56.789000, and a lookup by the same value finds nothing. A java.time.LocalDateTime of the same instant keeps the microseconds and matches.

Fix: route Decimal, date, and datetime positional parameters through convert_python_to_java, and convert a datetime to the UTC LocalDateTime of its instant (the instant is unchanged: a naive value is still read as local time, as datetime.timestamp() reads it). Tests in test_type_conversion.py.

Not changed here, for a decision: a naive datetime is stored as the instant of its local reading, and reads back as the UTC wall clock, so on a machine whose zone is not UTC a naive value does not read back equal to itself (12:34 written in UTC+9 reads 03:34).

Activity

  1. tae898
    added 5 commits that reference this issue on Oct 1, 2026

    bindings tests: datetime parameter test expects rows by instant, so i…

    7ac69aa

    bindings: a naive datetime is a UTC wall clock and reads back unchang…

    68279eb

    bindings: Decimal SQL parameters keep every digit, datetime/date para…

    90eadc7

    bindings tests: datetime parameter test expects rows by instant, so i…

    7c7d24d

    bindings: a naive datetime is a UTC wall clock and reads back unchang…

    4b27091
  2. tae898
    closed this as completedin #59on Oct 2, 2026
  3. tae898
    added a commit that references this issue on Oct 2, 2026

    bindings: Decimal SQL parameters keep every digit, datetime/date para…

    596d5a6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.