Hello Mahesh Reddy, Kudu Jenkins, Abhishek Chennaka,

I'd like you to reexamine a change. Please visit

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

to look at the new patch set (#3).

Change subject: KUDU-2671 fix updating partition end keys for unbounded ranges
......................................................................

KUDU-2671 fix updating partition end keys for unbounded ranges

This patch fixes an issue with updating the hash bucket components for
partitions' end keys in case of unbounded ranges.  I also added new test
scenarios that allowed to spot the issue.  The newly added scenarios
would fail if not including the fix.  In addition, I updated a few other
test scenarios to match the current logic of updating the hash partition
component of partition end key.

The previous implementation of updating the hash components tried to
avoid holes in the partition keyspace by carrying over iotas to next
hash dimension index, but with the introduction of range-specific hash
schemas it's no longer possible to do so while keeping the result
key ranges disjoint.

For example, consider the following partitioning:
  [-inf, 0) x 3 buckets x 3 buckets; [0, +inf) x 2 buckets x 2 buckets

The original set of ranges looks like the following:
  [ (0, 0,  ""), (0, 0, "0") )
  [ (0, 1,  ""), (0, 1, "0") )
  [ (0, 2,  ""), (0, 2, "0") )
  [ (1, 0,  ""), (1, 0, "0") )
  [ (1, 1,  ""), (1, 1, "0") )
  [ (1, 2,  ""), (1, 2, "0") )
  [ (2, 0,  ""), (2, 0, "0") )
  [ (2, 1,  ""), (2, 1, "0") )
  [ (2, 2,  ""), (2, 2, "0") )

  [ (0, 0, "0"), (0, 0,  "") )
  [ (0, 1, "0"), (0, 1,  "") )
  [ (1, 0, "0"), (1, 0,  "") )
  [ (1, 1, "0"), (1, 1,  "") )

The previous implementation would transform the key range
[ (0, 1, "0"), (0, 1,  "") ) into [ (0, 1, "0"), (1, 0,  "") ), but
that would put they key range [ (0, 2,  ""), (0, 2, "0") ) inside the
transformed one. That would mess up the interval logic of the partition
pruning and the client's metacache.

As it turns out, the continuous keyspace was just a nice thing to have
since the partition pruning and the client metacache work fine with
sparse keyspaces as well.

Change-Id: I3775f914a3b7cdc294a26911663c2d848f4e491b
---
M java/kudu-client/src/test/java/org/apache/kudu/client/TestAlterTable.java
M src/kudu/client/flex_partitioning_client-test.cc
M src/kudu/common/partition-test.cc
M src/kudu/common/partition.cc
4 files changed, 279 insertions(+), 65 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/08/18808/3
--
To view, visit http://gerrit.cloudera.org:8080/18808
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3775f914a3b7cdc294a26911663c2d848f4e491b
Gerrit-Change-Number: 18808
Gerrit-PatchSet: 3
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Abhishek Chennaka <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <[email protected]>

Reply via email to