Till Westmann has posted comments on this change. Change subject: Refactored the AbstractComparisonEvaluator. ......................................................................
Patch Set 1: (13 comments) Looks generally good to me, just a few comments. I didn't check carefullly that we only allocate each Pointable/Helper once per task and operator, but I think that you did that. Also, I'd feel better if we didn't change the Hyracks interface - adding is fine though. https://asterix-gerrit.ics.uci.edu/#/c/801/1/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/nonvisitor/AIntervalPointable.java File asterixdb/asterix-om/src/main/java/org/apache/asterix/om/pointables/nonvisitor/AIntervalPointable.java: Line 113: throw new IllegalStateException("Unsopported interval type."); s/Unsopported/Unsupported/ Could we add the type to the error message? Line 125: throw new IllegalStateException("Unsopported interval type."); s/Unsopported/Unsupported/ Could we add the type to the error message? Line 145: throw new IllegalStateException("Unsopported interval type."); s/Unsopported/Unsupported/ Could we add the type to the error message? Line 157: throw new IllegalStateException("Unsopported interval type."); s/Unsopported/Unsupported/ Could we add the type to the error message? https://asterix-gerrit.ics.uci.edu/#/c/801/1/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/ComparisonUtil.java File asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/comparisons/ComparisonUtil.java: Line 52: protected final IBinaryComparator strBinaryComp = AqlBinaryComparatorFactoryProvider.UTF8STRING_POINTABLE_INSTANCE Could those be private? Line 81: } Can we remove the curly braces here? Line 436: private final int compareByte(int v1, int v2) { Do we actually need -1, 0, 1 for these or would the difference work as well? https://asterix-gerrit.ics.uci.edu/#/c/801/1/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/GetOverlappingIntervalDescriptor.java File asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/GetOverlappingIntervalDescriptor.java: Line 105: if (interval0.getType() != interval0.getType()) { There might still be a point of putting those into local variables as the type tag gets accessed more than once .. https://asterix-gerrit.ics.uci.edu/#/c/801/1/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalLogic.java File asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalLogic.java: Line 57: ip2.getEnd(e2); Seems that only e1 and s2 are needed. Line 78: ip2.getEnd(e2); See above https://asterix-gerrit.ics.uci.edu/#/c/801/1/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalMetByDescriptor.java File asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalMetByDescriptor.java: Line 45: public FunctionIdentifier getIdentifier() { It seems that FID could either be a final member of the superclass (in which case we wouldn't need the method here) or that we could just return the constant without storing it in the object. https://asterix-gerrit.ics.uci.edu/#/c/801/1/hyracks-fullstack/hyracks/hyracks-data/hyracks-data-std/src/main/java/org/apache/hyracks/data/std/api/IComparable.java File hyracks-fullstack/hyracks/hyracks-data/hyracks-data-std/src/main/java/org/apache/hyracks/data/std/api/IComparable.java: Line 22: public int compareTo(byte[] bytes, int start, int length); Are you sure it's ok to remove this Hyracks interface? Seems risky for other consumers ... https://asterix-gerrit.ics.uci.edu/#/c/801/1/hyracks-fullstack/hyracks/hyracks-data/hyracks-data-std/src/main/java/org/apache/hyracks/data/std/primitive/TaggedValuePointable.java File hyracks-fullstack/hyracks/hyracks-data/hyracks-data-std/src/main/java/org/apache/hyracks/data/std/primitive/TaggedValuePointable.java: Line 26: public class TaggedValuePointable extends AbstractPointable { Oh, wow, we get one of those in Hyracks now :) -- To view, visit https://asterix-gerrit.ics.uci.edu/801 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I42e0e8cf71207bb862334cd0629e8c024ff0556c Gerrit-PatchSet: 1 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Preston Carman <[email protected]> Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Taewoo Kim <[email protected]> Gerrit-Reviewer: Till Westmann <[email protected]> Gerrit-HasComments: Yes
