Zoltan Borok-Nagy has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/16090 )

Change subject: IMPALA-2515: support parquet decimal with extra padding
......................................................................


Patch Set 5: Code-Review+2

(1 comment)

http://gerrit.cloudera.org:8080/#/c/16090/5/be/src/util/decimal-util.h
File be/src/util/decimal-util.h:

http://gerrit.cloudera.org:8080/#/c/16090/5/be/src/util/decimal-util.h@134
PS5, Line 134:       // We need to sign extend val. For example, if the 
original value was
             :       // -1, the original bytes were -1,-1,-1,-1. If we only 
wrote out 1 byte, ByteSwap()
             :       // only fills in the first byte of 'v' - the least 
significant byte. We initialize
             :       // the value to either 0 or -1 to ensure that the result 
is correctly sign-extended.
             :
             :       // GCC can optimize this code to an instruction pair of 
movsbq and sarq with no
             :       // branches.
             :       int8_t most_significant_byte = reinterpret_cast<const 
int8_t*>(buffer)[0];
             :       v->value() = most_significant_byte >= 0 ? 0 : -1;
             :       BitUtil::ByteSwap(reinterpret_cast<int8_t*>(v), buffer, 
fixed_len_size);
Nice!



--
To view, visit http://gerrit.cloudera.org:8080/16090
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2700652eab8ba7f23ffa75800a1712d310d4e1ec
Gerrit-Change-Number: 16090
Gerrit-PatchSet: 5
Gerrit-Owner: Tim Armstrong <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>
Gerrit-Comment-Date: Thu, 18 Jun 2020 10:12:07 +0000
Gerrit-HasComments: Yes

Reply via email to