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
In this case, I guess it will be safe to close this issue for the DB API driver, but check crate/sqlalchemy-cratedb#163 instead, if there is something to do for SQLAlchemy, which is more likely?
and to be more precise, http streams the full number (reaches the client), but the application/json MIME type directive is the one that truncates digits.
As CrateDB supports NUMERIC/DECIMAL types for quite some time (only the support to store numeric values was added recently), I wonder what this issue is about, what is missing?
Probably we want to change the related test case to use a NUMERIC column data type in the table definition.
Activity
amotl commentedon Oct 31, 2024
It is probably still the right choice to serialize Decimal values as strings, because there is no other way to marshal them through JSON?
crate-python/src/crate/client/http.py
Lines 95 to 96 in 8a3bf38
In this case, I guess it will be safe to close this issue for the DB API driver, but check crate/sqlalchemy-cratedb#163 instead, if there is something to do for SQLAlchemy, which is more likely?
/cc @matriv, @seut
matriv commentedon Nov 1, 2024
If we have the same behavior that we encountered here: crate/crate#16843
I agree to go with strings.
amotl commentedon Nov 6, 2024
Thank you. Then, there will be nothing to update or improve, other than the documentation perhaps, also on the Python driver at a relevant spot?
-- crate/crate#16843
As you advise that HTTP/JSON transport may loose precision, may I ask if it would be expectably different when using the PostgreSQL interface?
seut commentedon Nov 7, 2024
Yes, the issue is completely related to HTTP/JSON only.
matriv commentedon Nov 7, 2024
and to be more precise, http streams the full number (reaches the client), but the
application/jsonMIME type directive is the one that truncates digits.seut commentedon Jan 16, 2025
As CrateDB supports
NUMERIC/DECIMALtypes for quite some time (only the support to store numeric values was added recently), I wonder what this issue is about, what is missing?Probably we want to change the related test case to use a
NUMERICcolumn data type in the table definition.bgunebakan commentedon Sep 24, 2026
Closing this as superseded by #826 new ticket explains the problem precisely with reproduction, root cause, and a concrete proposed fix.