Michael Blow has posted comments on this change.

Change subject: [WIP] Code generator alternative
......................................................................


Patch Set 8:

(4 comments)

In addition to comments, the NullMissingTest and ExceptionIT should be updated. 
 The asterix-evaluator-generator-maven-plugin, it's usages, and runtime code to 
register codegen evaluators  should also be removed.

https://asterix-gerrit.ics.uci.edu/#/c/3043/8/asterixdb/asterix-fuzzyjoin/src/main/java/org/apache/asterix/runtime/evaluators/functions/EditDistanceStringIsFilterableEvaluator.java
File 
asterixdb/asterix-fuzzyjoin/src/main/java/org/apache/asterix/runtime/evaluators/functions/EditDistanceStringIsFilterableEvaluator.java:

PS8, Line 86: PointableHelper.checkMissingOrNull(result, stringPtr, 
isReturnNull)
            :                 || PointableHelper.checkMissingOrNull(result, 
edThreshPtr, isReturnNull)
            :                 || PointableHelper.checkMissingOrNull(result, 
gramLenPtr, isReturnNull)
            :                 || PointableHelper.checkMissingOrNull(result, 
usePrePostPtr, isReturnNull)
see comment in PointableHelper, if checkMissingOrNull used vararg, we can make 
this a single method invocation.


PS8, Line 93:         // Null argument encountered
            :         if (isReturnNull.getValue()) {
            :             PointableHelper.setNull(result);
            :             return;
            :         }
it seems like we usually (always?) do this in the case of null-- why not 
setNull() inside of the helper method, then al the added code can be replaced 
with:

  if (PointableHelper.checkMissingOrNull(result, stringPtr, edThreshPtr, 
gramLenPtr, usePrePostPtr)) {
        return;
  }

if there are exceptions, we can add a second helper method for that case, which 
returns an enum of null, missing, or present...?


https://asterix-gerrit.ics.uci.edu/#/c/3043/8/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/PointableHelper.java
File 
asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/PointableHelper.java:

PS8, Line 161: IPointable argument
make a vararg, to enable checking multiple args in single invocation


PS8, Line 171:        // MISSING check
             :         if (data[offset] == 
ATypeTag.SERIALIZED_MISSING_TYPE_TAG) {
             :             setMissing(result);
             :             return true;
             :         }
             : 
             :         // NULL check (Only flag at this stage)
             :         if (data[offset] == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
             :             setNull(result);
             :             isNull.setValue(true);
             :         }
             : 
             :         // This is reached only if it's not MISSING or NULL
             :         return false;
consider using an enum to reflect the three states (NULL, MISSING, PRESENT(?)), 
instead of splitting the result between the return state and a mutable boolean 
parameter...


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icca2e2128c4b0f2bfd8675655cf5296cbbaeba88
Gerrit-PatchSet: 8
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Hussain Towaileb <[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: Michael Blow <[email protected]>
Gerrit-Reviewer: Till Westmann <[email protected]>
Gerrit-HasComments: Yes

Reply via email to