GitHub user manishgupta88 opened a pull request:
https://github.com/apache/carbondata/pull/1297
[WIP] Added a value based compression for decimal data type when decimal is
stored as Int or Long
Added a value based compression for decimal data type when decimal is
stored as Int or Long
1. When decimal precision is <= 9, decimal values are stored in 4 bytes but
they are not compressed further based on min and max values as compared with
other primitive data type compression. Therefore now based on min and max value
decimal data falling in Integer range will be further compressed as byte or
short.
2. When decimal precision is <= 18, decimal values are stored in 8 bytes
but they are not compressed further based on min and max values as compared
with other primitive data type compression. Therefore now based on min and max
value decimal data falling in Long range will be further compressed as byte,
short or int.
Advantage: This will reduce the storage space thereby decreasing the IO
time while decompressing the data.
TODO: Need to be implemented for unsafe type
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/manishgupta88/carbondata decimal_compression
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/carbondata/pull/1297.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1297
----
commit 04d47802fa139f9a359ca6727f4f79a26402b43a
Author: manishgupta88 <[email protected]>
Date: 2017-08-24T07:13:58Z
Added a value based compression for decimal data type.
1. When decimal precision is <= 9, decimal values are stored in 4 bytes but
they are not compressed further based on min and max values as compared with
other primitive data type compression. Therefore now based on min and max value
decimal data falling in Integer range will be further compressed as byte or
short.
2. When decimal precision is <= 18, decimal values are stored in 8 bytes
but they are not compressed further based on min and max values as compared
with other primitive data type compression. Therefore now based on min and max
value decimal data falling in Long range will be further compressed as byte,
short or int.
Advantage: This will reduce the storage space thereby decreasing the IO
time while decompressing the data.
----
---
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 [email protected] or file a JIRA ticket
with INFRA.
---