Ian Maxon has posted comments on this change.

Change subject: Full-text implementation step 1
......................................................................


Patch Set 6:

(7 comments)

Some questions/thoughts about the BinaryHashSet, I will start on the rest in 
the meantime.

https://asterix-gerrit.ics.uci.edu/#/c/1228/6/hyracks-fullstack/hyracks/hyracks-data/hyracks-data-std/src/main/java/org/apache/hyracks/data/std/util/BinaryHashSet.java
File 
hyracks-fullstack/hyracks/hyracks-data/hyracks-data-std/src/main/java/org/apache/hyracks/data/std/util/BinaryHashSet.java:

Line 100:      *         -1: when an insertion fails.
I don't see the case in which put() will return -1. If it finds it, you'll get 
the count. If it doesn't, you attempt to insert. This will either throw an 
exception or return 0.


Line 163:                 if (entryKeyLen == key.getLength() && 
cmp.compare(this.refArray, entryKeyOff, entryKeyLen,
The first condition on the if here is common between the two cases of the outer 
condition. It could be pulled up, couldn't it?


Line 179:                     }
Why are the offsets given to put/get different?


Line 238:         return (int) ((ptr >> 16) & 0xffff);
You shouldn't have to cast here.


Line 242:         return (int) (ptr & 0xffff);
Or here.


Line 285:                 // Set the count as zero
Again, why's the offset different here than get?


Line 303:      */
My 2c here is making another nested class with the exact same name and purpose 
as an existing one but ever so slightly different fields is confusing. If there 
would be a way to make BinaryHashMap and BinaryHashSet share the same 
struct-ish class here that might be clearer.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: If00a871a8241d6aa6931f97b694d65f164d3ab8c
Gerrit-PatchSet: 6
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Taewoo Kim <wangs...@yahoo.com>
Gerrit-Reviewer: Heri Ramampiaro <heri...@gmail.com>
Gerrit-Reviewer: Ian Maxon <ima...@apache.org>
Gerrit-Reviewer: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Jianfeng Jia <jianfeng....@gmail.com>
Gerrit-Reviewer: Michael Blow <mb...@apache.org>
Gerrit-Reviewer: Taewoo Kim <wangs...@yahoo.com>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <buyin...@gmail.com>
Gerrit-HasComments: Yes

Reply via email to