Luo Chen has posted comments on this change.

Change subject: [ASTERIXDB-920] Fix BTree Composite Key Search
......................................................................


Patch Set 6:

> Chen,
 > Can you double check that the search is a prefix search?
 > Otherwise, wouldn't there be a problem?
 > 
 > Think of the case: where x>10 and x<100 and y>10 and y< 100
 > If the search is not prefix and it encounters x = 50, y=200, it
 > would stop because it doesn't match the predicate.

This is fine I think. In BTree search, we don't evaluate predicates on search 
keys one by one, but rather find the startIndex and endIndex. In this example, 
the search range is (x, y) in (10, 10) to (100, 100). For (50, 200), even it 
fails the predicate, it's still less than (100, 100) since we compare x first. 
As a result, it won't be treated as the endIndex. (This also shows we need to 
add select operator after the search).

To be safe, also added a test case for this.

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2227
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8654e52aec59601c533255cd57c2824612066fc0
Gerrit-PatchSet: 6
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Luo Chen <[email protected]>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Luo Chen <[email protected]>
Gerrit-Reviewer: Taewoo Kim <[email protected]>
Gerrit-Reviewer: abdullah alamoudi <[email protected]>
Gerrit-HasComments: No

Reply via email to