Dmitry Lychagin has posted comments on this change. ( https://asterix-gerrit.ics.uci.edu/3377 )
Change subject: [ASTERIXDB-2562][FUN] Add support for bitwise functions ...................................................................... Patch Set 14: Code-Review+2 (2 comments) I think we can merge it, but there's one thing we should improve. 1. We need to add tests where each function is called multiple times. something like. FROM range(0, 10) i SELECT VALUE bitset(i , ..) . The purpose is to test how each function runtime performs on subsequent invocations. (we can do this in a separate change) 2. (minor) You're using the following pattern in test queries. "t1" : (SELECT VALUE f(...))[0] It works but is equivalent to just "t1": f(...) We can keep existing tests as is because they work fine. This is just for future reference. https://asterix-gerrit.ics.uci.edu/#/c/3377/13/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/bitwise/AbstractBitValuePositionFlagEvaluator.java File asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/bitwise/AbstractBitValuePositionFlagEvaluator.java: https://asterix-gerrit.ics.uci.edu/#/c/3377/13/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/bitwise/AbstractBitValuePositionFlagEvaluator.java@123 PS13, Line 123: > checkAndSetMissingOrNull() only assumes the first 2 arguments are not null, I think it's fine. flagPointable was never null in your previous code, that's why I made this comment. but if it's always null if there's no flag, then passing it to checkAndSetMissingOrNull is ok. Regarding assuming that first 2 arguments are not null. I think it's ok to do. Those two should alway be present, otherwise there's no point in calling checkAndSetMissingOrNull method. https://asterix-gerrit.ics.uci.edu/#/c/3377/13/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/bitwise/BitClearDescriptor.java File asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/bitwise/BitClearDescriptor.java: https://asterix-gerrit.ics.uci.edu/#/c/3377/13/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/bitwise/BitClearDescriptor.java@130 PS13, Line 130: > It seems in both cases, the item gets written eventually to the provided po Yes, you're right. So we don't need to look at the result value -- To view, visit https://asterix-gerrit.ics.uci.edu/3377 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I70a6376d6ca12da55eeff88fa0b1c85f970ef8e6 Gerrit-Change-Number: 3377 Gerrit-PatchSet: 14 Gerrit-Owner: Hussain Towaileb <hussai...@gmail.com> Gerrit-Reviewer: Ali Alsuliman <ali.al.solai...@gmail.com> Gerrit-Reviewer: Anon. E. Moose (1000171) Gerrit-Reviewer: Dmitry Lychagin <dmitry.lycha...@couchbase.com> Gerrit-Reviewer: Hussain Towaileb <hussai...@gmail.com> Gerrit-Reviewer: Hussain Towaileb <hussai...@gmail.com> Gerrit-Reviewer: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Gerrit-Reviewer: Till Westmann <ti...@apache.org> Gerrit-Comment-Date: Wed, 22 May 2019 19:10:15 +0000 Gerrit-HasComments: Yes