Hello David Ribeiro Alves, Eli Collins,

I'd like you to do a code review.  Please visit

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

to review the following change.

Change subject: KUDU-1437. Properly handle negative values in RLE-encoded 
signed int blocks
......................................................................

KUDU-1437. Properly handle negative values in RLE-encoded signed int blocks

This fixes a bug where we didn't properly handle signed integers when writing
RLE-encoded blocks. The issue is that the signed ints were being sign-extended
up to 64 bits, so the high bits were all set to 1. We didn't properly mask off
these '1' bits before writing into the output.

After changing the tests to cover negative values, this reproduced easily.

I also removed some crufty test code for RLE-encoded blocks which ended up
duplicating the type-parameterized 'TestRoundTrip' test case.

Change-Id: I64c8a2944689b4ae8f4cdb105a9dc3f8183d358f
---
M src/kudu/cfile/cfile-test.cc
M src/kudu/cfile/encoding-test.cc
M src/kudu/util/bit-stream-utils.h
M src/kudu/util/bit-stream-utils.inline.h
4 files changed, 37 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/54/2954/1
-- 
To view, visit http://gerrit.cloudera.org:8080/2954
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I64c8a2944689b4ae8f4cdb105a9dc3f8183d358f
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: David Ribeiro Alves <[email protected]>
Gerrit-Reviewer: Eli Collins <[email protected]>

Reply via email to