Todd Lipcon has submitted this change and it was merged.

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
Reviewed-on: http://gerrit.cloudera.org:8080/2954
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <[email protected]>
---
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(-)

Approvals:
  Adar Dembo: Looks good to me, approved
  Kudu Jenkins: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I64c8a2944689b4ae8f4cdb105a9dc3f8183d358f
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: David Ribeiro Alves <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <[email protected]>

Reply via email to