You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@orc.apache.org by GitBox <gi...@apache.org> on 2020/12/23 02:54:00 UTC

[GitHub] [orc] chaoyli commented on a change in pull request #586: ORC-703 : Fix RLE encoding bug on large negative integer.

chaoyli commented on a change in pull request #586:
URL: https://github.com/apache/orc/pull/586#discussion_r547611235



##########
File path: c++/src/RleEncoderV2.cc
##########
@@ -577,7 +577,10 @@ void RleEncoderV2::writePatchedBasedValues(EncodingOption& option) {
     // find the number of bytes required for base and shift it by 5 bits
     // to accommodate patch width. The additional bit is used to store the sign
     // of the base value.
-    const uint32_t baseWidth = findClosestNumBits(option.min) + 1;
+    uint32_t baseWidth = findClosestNumBits(option.min) + 1;

Review comment:
       Change getClosestFixedBits() logic will affect another code paths.
   Because the sign is only needed in PatchBase encoding.
   So change the PatchBase encoding will be better.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org