carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipesala <>
Subject [GitHub] incubator-carbondata pull request #644: [CARBONDATA-757]Big decimal optimiza...
Date Fri, 10 Mar 2017 14:11:00 GMT
GitHub user ravipesala opened a pull request:

    [CARBONDATA-757]Big decimal optimization

    Currently Decimal is converted to bytes and using LV (length + value) format to write
to store. And while getting back read the bytes in LV format and convert back the bigdecimal.
    We can do following operations to improve storage and processing.
    1. if decimal precision is less than 9 then we can fit in int (4 bytes)
    2. if decimal precision is less than 18 then we can fit in long (8 bytes)
    3. if decimal precision is more than 18 then we can fit in fixed length bytes(the length
bytes can vary depends on precision but it is always fixed length)
    So in this approach we no need store bigdecimal in LV format, we can store in fixed format.It
reduces the memory.
    Carbondata format changes -> Added fixedLength in datachunk to know about the column
length of big  decimal. This attribute can be used in case of char(fixedlength) or varchar(fixedlength)
datatypes as well.

You can merge this pull request into a Git repository by running:

    $ git pull bigdecimal-optimize

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #644
commit 241c032f3e54facb59ba0b946f3c0c0c67dab59c
Author: ravipesala <>
Date:   2017-03-09T12:42:47Z

    BigDecimal optimization


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message