You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kudu.apache.org by "Todd Lipcon (Code Review)" <ge...@cloudera.org> on 2016/05/04 19:38:54 UTC

[kudu-CR] KUDU-1437. Properly handle negative values in RLE-encoded signed int blocks

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 <to...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@cloudera.com>
Gerrit-Reviewer: Eli Collins <el...@cloudera.com>