Skip to content

Data Type: NUMERIC #652

Description

@amotl

About

CrateDB gained a new data type NUMERIC. Most probably, we want to support it here in one way or another.

References

Activity

  1. amotl commented on Oct 31, 2024

    @amotl
    ContributorAuthor

    It is probably still the right choice to serialize Decimal values as strings, because there is no other way to marshal them through JSON?

    if isinstance(o, (Decimal, UUID)):
    return str(o)

    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

  2. matriv commented on Nov 1, 2024

    @matriv
    Contributor

    If we have the same behavior that we encountered here: crate/crate#16843
    I agree to go with strings.

  3. amotl commented on Nov 6, 2024

    @amotl
    ContributorAuthor

    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?

  4. seut commented on Nov 7, 2024

    @seut
    Member

    As you advise that HTTP/JSON transport may loose precision, may I ask if it would be expectably different when using the PostgreSQL interface?

    Yes, the issue is completely related to HTTP/JSON only.

  5. matriv commented on Nov 7, 2024

    @matriv
    Contributor

    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.

  6. seut commented on Jan 16, 2025

    @seut
    Member

    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.

  7. bgunebakan commented on Sep 24, 2026

    @bgunebakan
    Contributor

    Closing this as superseded by #826 new ticket explains the problem precisely with reproduction, root cause, and a concrete proposed fix.

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

Metadata

Metadata

Assignees

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