Hao Hao has uploaded a new change for review.

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

Change subject: KUDU-2055 [part 2]: Add util to construct sorted disjoint 
interval
......................................................................

KUDU-2055 [part 2]: Add util to construct sorted disjoint interval

This patch adds an utility to construct a sorted disjoint interval set
given a set of intervals. The operation to construct such one is
O(nlgn + n) where 'n' is the number of intervals.

For example, given the input interval set:
   |------1-------|         |-----2-----|
       |--3--|    |---4--|    |----5----|

The output sorted disjoint interval set is:
   |----------1----------|  |-----2-----|

It also adds unit test to verify given overlap, duplicate, invalid
intervals, the implementation works as expected.

Change-Id: I61a813c047be4882f246eaf404598e7e18fcac87
---
M src/kudu/util/CMakeLists.txt
A src/kudu/util/sorted_disjoint_interval-test.cc
A src/kudu/util/sorted_disjoint_interval.h
3 files changed, 261 insertions(+), 0 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I61a813c047be4882f246eaf404598e7e18fcac87
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Hao Hao <hao....@cloudera.com>

Reply via email to