Yifan Zhang has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/18434 )

Change subject: KUDU-1644: Simplify InList predicate values based on rowset PK 
bounds
......................................................................


Patch Set 2:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/18434/2//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/18434/2//COMMIT_MSG@11
PS2, Line 11: Also, the DRS bounds info can be used to skip rows
            : effectively when we have a predicate on a non-prefix of the 
primary key and the
            : leading column(s) have cardinality=1 (as described in KUDU-1291).
> Was this implemented in this patch? I'm not sure I saw it.
Yes, we can use the bound information to seek where we start to scan in a 
rowset. That makes us skipping rows or even a whole rowset.

If we have two columns (a, b) in a rowset, the rowset has bound (1, 1) and 
(1,10), and we have a scan request with a predicate b >= 2. After optimizing 
ScanSpec, we will get the bound (1, 2) and (1, 10), and then we can use these 
bounds to get lower_bound_idx and upper_bound_idx, so we can scan at the row 
(1, 2).


http://gerrit.cloudera.org:8080/#/c/18434/2/src/kudu/tablet/cfile_set.cc
File src/kudu/tablet/cfile_set.cc:

http://gerrit.cloudera.org:8080/#/c/18434/2/src/kudu/tablet/cfile_set.cc@439
PS2, Line 439:     spec->SetLowerBoundKey(implicit_lb_key);
> I'm confused about why we're able to modify the ScanSpec for every CFileSet
Because we create a ScanSpec copy for each CFileSet Iterator: 
https://github.com/apache/kudu/blob/master/src/kudu/common/generic_iterators.cc#L1026



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia9c2aa958f19a0b62e40a2ef5eb5365f91cbab80
Gerrit-Change-Number: 18434
Gerrit-PatchSet: 2
Gerrit-Owner: Yifan Zhang <chinazhangyi...@163.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Yifan Zhang <chinazhangyi...@163.com>
Gerrit-Comment-Date: Wed, 04 May 2022 11:24:10 +0000
Gerrit-HasComments: Yes

Reply via email to