Dmitry Lychagin has posted comments on this change. Change subject: [NO ISSUE][FUN] Implement array functions p2 ......................................................................
Patch Set 13: (3 comments) https://asterix-gerrit.ics.uci.edu/#/c/2756/13/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractArrayProcessEval.java File asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/AbstractArrayProcessEval.java: Line 114: pointableAllocator.reset(); let's reset() both pools before we call processList(). Currently they're not reset if an exception happens. https://asterix-gerrit.ics.uci.edu/#/c/2756/12/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/ArrayDistinctDescriptor.java File asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/ArrayDistinctDescriptor.java: Line 136: hash = binaryHashFunction.hash(item.getByteArray(), item.getStartOffset(), item.getLength()); > Not sure if I got your point. The list will be created when I only need to The arguments are evaluated before the method is called. Not sure whether jvm optimizes this or not, but why take chances? I'd suggest to use get() and the if there's no mapping then get a list instance from the object pool, like we did for pointables. https://asterix-gerrit.ics.uci.edu/#/c/2756/13/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/ArrayDistinctDescriptor.java File asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/ArrayDistinctDescriptor.java: Line 148: item = new VoidPointable(); let's also get this from pointableAlocator -- To view, visit https://asterix-gerrit.ics.uci.edu/2756 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5e9c4ff6400b7fe93ca2aab0234750dc78f50659 Gerrit-PatchSet: 13 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Ali Alsuliman <[email protected]> Gerrit-Reviewer: Ali Alsuliman <[email protected]> Gerrit-Reviewer: Anon. E. Moose #1000171 Gerrit-Reviewer: Dmitry Lychagin <[email protected]> Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Till Westmann <[email protected]> Gerrit-Reviewer: abdullah alamoudi <[email protected]> Gerrit-HasComments: Yes
