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 <[email protected]> Gerrit-Reviewer: Heri Ramampiaro <[email protected]> Gerrit-Reviewer: Ian Maxon <[email protected]> Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Jianfeng Jia <[email protected]> Gerrit-Reviewer: Michael Blow <[email protected]> Gerrit-Reviewer: Taewoo Kim <[email protected]> Gerrit-Reviewer: Till Westmann <[email protected]> Gerrit-Reviewer: Yingyi Bu <[email protected]> Gerrit-HasComments: Yes
