impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zach Amsden (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-2020: Make it easy to work with big numbers
Date Sat, 04 Feb 2017 01:28:49 GMT
Zach Amsden has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/5902

Change subject: IMPALA-2020: Make it easy to work with big numbers
......................................................................

IMPALA-2020: Make it easy to work with big numbers

We're going to be working with some really big numbers that
can't always be expressed in legal C++ but can be generated
at compile time.

Testing: Ran this in godbolt:

int lotsanines = LargeNum<int>(9, 9);
__int128 bignines = LargeNum<__int128>(9, 38);`

lotsanines:
        .long   999999999
bignines:
        .quad   687399551400673279
        .quad   5421010862427522170

Ran this query in Python:

>>> print 687399551400673279 + (5421010862427522170 * 2**64)
99999999999999999999999999999999999999
>>>

Looks legit.

Change-Id: I5095a366d914cebb0b64bd434a08dbb55c90ed30
---
M be/src/common/init.cc
M be/src/util/decimal-util.cc
M be/src/util/decimal-util.h
3 files changed, 8 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/02/5902/1
-- 
To view, visit http://gerrit.cloudera.org:8080/5902
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5095a366d914cebb0b64bd434a08dbb55c90ed30
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Zach Amsden <zamsden@cloudera.com>

Mime
View raw message