Skip to content

[Bug] Can't store IPv6 address decimal data for decimal length is not enough #26813

@wangchong2023

Description

@wangchong2023

Search before asking

  • I had searched in the issues and found no similar issues.

Version

v2.0.1

What's Wrong?

Currently the maximum number of Decimal type integers supported by Doris can only be 38.
We hope to store the digital form of IPv6 addresses through Doris, which will cause the data to be stored incorrectly.
After browsing the Decimal type of the ClickHouse database, the Decimal type can support up to Decimal256(S), which can effectively solve the storage problem when the value is large.

What You Expected?

The precision of the integer part of Decimal can at least support the length of the number corresponding to the IPv6 address.

How to Reproduce?

Documentation about Decimal type and practice have confirmed that when the Decimal precision is specified as DECIMAL(38, 0), the value corresponding to the IPv6 address (2409:8087:574C:14:1000::49) cannot be saved.

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

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