You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 21, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 21, 2026. It is now read-only.
insert_columns raises 'Cannot convert value to Java int' for a commit_every beyond 32 bits, which insert_many accepts #322
Level: bindings. Found by the 2026-10-14 re-hunt of the read and write transports (main 708061d, the wheel's engine jars, JDK 25).
Database.insert_columns(..., commit_every=n) passes int(n) to a Java int, so a commit_every of 2**31 or more raises ArcadeDBError: Failed to bulk-insert ...: Cannot convert value to Java int. insert_many takes any int, and a value beyond the row count is the natural way to ask for one transaction (sys.maxsize included). The call fails before it writes anything.
A second, smaller mismatch in the same area: the docstring of Database.lookup_by_key says it returns "Python-wrapped records" and its example does list(db.lookup_by_key(...)) and records[0], but the method returns the first match or None (the API page says Optional[Document]), and list(record) raises TypeError: 'Document' object is not iterable (out/p15-commit-every-main.txt, last line).
insert_many commit_every=2147483647 inserted 5
insert_columns commit_every=2147483647 inserted 5
insert_many commit_every=2147483648 inserted 5
insert_columns commit_every=2147483648 ArcadeDBError: Failed to bulk-insert into 'C': Cannot convert value to Java
insert_many commit_every=10000000000 inserted 5
insert_columns commit_every=10000000000 ArcadeDBError: Failed to bulk-insert into 'C': Cannot convert value to Java
The fix clamps the value at 2**31 - 1 before the call (the Java loop commits when a row index is a multiple of it, so a larger value means never within one call) and corrects the docstring. Test first, in the pull request.
Activity
bindings: insert_columns takes a commit_every beyond 32 bits like ins…