You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Haijie Hong (Code Review)" <ge...@cloudera.org> on 2016/12/05 13:03:11 UTC
[kudu-CR] Tightening ScanSpec primary bounds when range predicate exists
Haijie Hong has uploaded a new change for review.
http://gerrit.cloudera.org:8080/5360
Change subject: Tightening ScanSpec primary bounds when range predicate exists
......................................................................
Tightening ScanSpec primary bounds when range predicate exists
Currently, push upper bound key predicates will break when meeting
a range predicate.
I think the upper bound key can be decreased.
For example, If PK = (a, b) and a < 2 && b < 3, PK can be further
tightning to PK < (1, 3).
Change-Id: I931a617605434700352d285fc2039033cf9eb07e
---
M src/kudu/common/key_util.cc
M src/kudu/common/key_util.h
2 files changed, 104 insertions(+), 17 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/60/5360/1
--
To view, visit http://gerrit.cloudera.org:8080/5360
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I931a617605434700352d285fc2039033cf9eb07e
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Haijie Hong <ho...@gmail.com>
[kudu-CR] Tightening ScanSpec primary bounds when range predicate exists
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has submitted this change and it was merged.
Change subject: Tightening ScanSpec primary bounds when range predicate exists
......................................................................
Tightening ScanSpec primary bounds when range predicate exists
Currently, push upper bound key predicates will break when meeting
a range predicate.
I think the upper bound key can be decreased.
For example, If PK = (a, b) and a < 2 && b < 3, PK can be further
tightning to PK < (1, 3).
Change-Id: I931a617605434700352d285fc2039033cf9eb07e
Reviewed-on: http://gerrit.cloudera.org:8080/5360
Tested-by: Kudu Jenkins
Reviewed-by: Dan Burkert <da...@apache.org>
---
M src/kudu/common/key_util-test.cc
M src/kudu/common/key_util.cc
M src/kudu/common/key_util.h
M src/kudu/common/scan_spec-test.cc
4 files changed, 221 insertions(+), 22 deletions(-)
Approvals:
Dan Burkert: Looks good to me, approved
Kudu Jenkins: Verified
--
To view, visit http://gerrit.cloudera.org:8080/5360
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I931a617605434700352d285fc2039033cf9eb07e
Gerrit-PatchSet: 5
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Haijie Hong <ho...@gmail.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Haijie Hong <ho...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
[kudu-CR] Tightening ScanSpec primary bounds when range predicate exists
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change.
Change subject: Tightening ScanSpec primary bounds when range predicate exists
......................................................................
Patch Set 2:
(7 comments)
http://gerrit.cloudera.org:8080/#/c/5360/2/src/kudu/common/key_util.cc
File src/kudu/common/key_util.cc:
PS2, Line 146:
:
Keep this, but change it to
stopping after the first missing predicate or range predicate which can't be transformed to an inclusive upper bound.
Line 155: bool DecrementStringCell(void* cell_ptr, Arena* arena) {
I don't think it's necessary to do any copying of the data here - you should just be able to make the Slice shorter by 1, but still pointing at the same data. As a result you won't need to take an Arena and the signature can be simplified.
PS2, Line 209: need_increase
I think it makes sense to think about this in terms of exclusive vs. inclusive upper bound, so maybe rename this variable 'is_inclusive_bound'.
PS2, Line 226:
align with 'row' above.
PS2, Line 251: if range upper bound decrease fail, no need to increase key
change this to
If the upper bound is inclusive, increment it to become exclusive.
http://gerrit.cloudera.org:8080/#/c/5360/2/src/kudu/common/key_util.h
File src/kudu/common/key_util.h:
Line 64: bool DecrementCell(const ColumnSchema& col, void* cell_ptr, Arena* arena);
Please add unit tests to key_util-test.cc for this method.
http://gerrit.cloudera.org:8080/#/c/5360/2/src/kudu/common/scan_spec-test.cc
File src/kudu/common/scan_spec-test.cc:
Line 184: }
Could you add a few cases for LT predicates on non-decrementable values of type int and string?
--
To view, visit http://gerrit.cloudera.org:8080/5360
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I931a617605434700352d285fc2039033cf9eb07e
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Haijie Hong <ho...@gmail.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: Yes
[kudu-CR] Tightening ScanSpec primary bounds when range predicate exists
Posted by "Haijie Hong (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/5360
to look at the new patch set (#3).
Change subject: Tightening ScanSpec primary bounds when range predicate exists
......................................................................
Tightening ScanSpec primary bounds when range predicate exists
Currently, push upper bound key predicates will break when meeting
a range predicate.
I think the upper bound key can be decreased.
For example, If PK = (a, b) and a < 2 && b < 3, PK can be further
tightning to PK < (1, 3).
Change-Id: I931a617605434700352d285fc2039033cf9eb07e
---
M src/kudu/common/key_util-test.cc
M src/kudu/common/key_util.cc
M src/kudu/common/key_util.h
M src/kudu/common/scan_spec-test.cc
4 files changed, 221 insertions(+), 22 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/60/5360/3
--
To view, visit http://gerrit.cloudera.org:8080/5360
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I931a617605434700352d285fc2039033cf9eb07e
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Haijie Hong <ho...@gmail.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
[kudu-CR] Tightening ScanSpec primary bounds when range predicate exists
Posted by "Haijie Hong (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/5360
to look at the new patch set (#4).
Change subject: Tightening ScanSpec primary bounds when range predicate exists
......................................................................
Tightening ScanSpec primary bounds when range predicate exists
Currently, push upper bound key predicates will break when meeting
a range predicate.
I think the upper bound key can be decreased.
For example, If PK = (a, b) and a < 2 && b < 3, PK can be further
tightning to PK < (1, 3).
Change-Id: I931a617605434700352d285fc2039033cf9eb07e
---
M src/kudu/common/key_util-test.cc
M src/kudu/common/key_util.cc
M src/kudu/common/key_util.h
M src/kudu/common/scan_spec-test.cc
4 files changed, 221 insertions(+), 22 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/60/5360/4
--
To view, visit http://gerrit.cloudera.org:8080/5360
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I931a617605434700352d285fc2039033cf9eb07e
Gerrit-PatchSet: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Haijie Hong <ho...@gmail.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
[kudu-CR] Tightening ScanSpec primary bounds when range predicate exists
Posted by "Haijie Hong (Code Review)" <ge...@cloudera.org>.
Haijie Hong has restored this change.
Change subject: Tightening ScanSpec primary bounds when range predicate exists
......................................................................
Restored
--
To view, visit http://gerrit.cloudera.org:8080/5360
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: restore
Gerrit-Change-Id: I931a617605434700352d285fc2039033cf9eb07e
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Haijie Hong <ho...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
[kudu-CR] Tightening ScanSpec primary bounds when range predicate exists
Posted by "Haijie Hong (Code Review)" <ge...@cloudera.org>.
Haijie Hong has abandoned this change.
Change subject: Tightening ScanSpec primary bounds when range predicate exists
......................................................................
Abandoned
--
To view, visit http://gerrit.cloudera.org:8080/5360
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: abandon
Gerrit-Change-Id: I931a617605434700352d285fc2039033cf9eb07e
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Haijie Hong <ho...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
[kudu-CR] Tightening ScanSpec primary bounds when range predicate exists
Posted by "Haijie Hong (Code Review)" <ge...@cloudera.org>.
Haijie Hong has posted comments on this change.
Change subject: Tightening ScanSpec primary bounds when range predicate exists
......................................................................
Patch Set 4:
(6 comments)
> (7 comments)
http://gerrit.cloudera.org:8080/#/c/5360/2/src/kudu/common/key_util.cc
File src/kudu/common/key_util.cc:
Line 155: memcpy(cell_ptr, &inc, sizeof(inc));
> I don't think it's necessary to do any copying of the data here - you shoul
Done
PS2, Line 209: break_loop =
> I think it makes sense to think about this in terms of exclusive vs. inclus
Done
PS2, Line 226: C
> align with 'row' above.
Done
PS2, Line 251: predicates == 0) { return 0; }
> change this to
Done
http://gerrit.cloudera.org:8080/#/c/5360/2/src/kudu/common/key_util.h
File src/kudu/common/key_util.h:
Line 64: bool TryDecrementCell(const ColumnSchema &col, void *cell_ptr);
> Please add unit tests to key_util-test.cc for this method.
Done
http://gerrit.cloudera.org:8080/#/c/5360/2/src/kudu/common/scan_spec-test.cc
File src/kudu/common/scan_spec-test.cc:
Line 184: SCOPED_TRACE(spec.ToString(schema_));
> Could you add a few cases for LT predicates on non-decrementable values of
I have added non-decrementable string test cases. I think non-decrementable int predicate will be simplified as PredicateType::None.
--
To view, visit http://gerrit.cloudera.org:8080/5360
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I931a617605434700352d285fc2039033cf9eb07e
Gerrit-PatchSet: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Haijie Hong <ho...@gmail.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Haijie Hong <ho...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: Yes
[kudu-CR] Tightening ScanSpec primary bounds when range predicate exists
Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change.
Change subject: Tightening ScanSpec primary bounds when range predicate exists
......................................................................
Patch Set 4: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/5360
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I931a617605434700352d285fc2039033cf9eb07e
Gerrit-PatchSet: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Haijie Hong <ho...@gmail.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Haijie Hong <ho...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: No
[kudu-CR] Tightening ScanSpec primary bounds when range predicate exists
Posted by "Haijie Hong (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/5360
to look at the new patch set (#2).
Change subject: Tightening ScanSpec primary bounds when range predicate exists
......................................................................
Tightening ScanSpec primary bounds when range predicate exists
Currently, push upper bound key predicates will break when meeting
a range predicate.
I think the upper bound key can be decreased.
For example, If PK = (a, b) and a < 2 && b < 3, PK can be further
tightning to PK < (1, 3).
Change-Id: I931a617605434700352d285fc2039033cf9eb07e
---
M src/kudu/common/key_util.cc
M src/kudu/common/key_util.h
M src/kudu/common/scan_spec-test.cc
3 files changed, 109 insertions(+), 20 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/60/5360/2
--
To view, visit http://gerrit.cloudera.org:8080/5360
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I931a617605434700352d285fc2039033cf9eb07e
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Haijie Hong <ho...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot