Yingyi Bu has posted comments on this change. Change subject: commit dd5a69be93472bc8a78d10ca7b0f8b8be9412bf4 Author: Dmitry Lychagin <[email protected]> Date: Fri May 12 13:16:01 2017 -0700 ......................................................................
Patch Set 2: (3 comments) https://asterix-gerrit.ics.uci.edu/#/c/1745/2/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/functions/BuiltinFunctions.java File asterixdb/asterix-om/src/main/java/org/apache/asterix/om/functions/BuiltinFunctions.java: PS2, Line 892: IfMissingOrNullTypeComputer Their type computers seem to be different? https://asterix-gerrit.ics.uci.edu/#/c/1745/2/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/IfMissingOrNullTypeComputer.java File asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/IfMissingOrNullTypeComputer.java: PS2, Line 39: 1. if a leading argument is null/missing, it should look at consequent arguments; 2. if an argument is not optional, it doesn't need to look at consequent arguments. Here is my trial for the loop: for (Mutable<ILogicalExpression> argRef : fce.getArguments()) { ILogicalExpression arg = argRef.getValue(); IAType argType = (IAType) env.getType(arg); ATypeTag argTypeTag = argType.getTypeTag(); // null or missing if (argTypeTag == ATypeTag.NULL || argTypeTag == ATypeTag.MISSING){ continue; } if (resultType == null) { resultType = argType; } // result type cannot be null or missing if (!NonTaggedFormatUtil.isOptional(resultType)){ break; } AUnionType unionType = (AUnionType) resultType; if (unionType.getActualType().equals(argType)){ resultType = argType; // result type cannot be null or missing. break; } if (!resultType.equals(argType)) { resultType = BuiltinType.ANY break; } } https://asterix-gerrit.ics.uci.edu/#/c/1745/2/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/IfMissingOrNullDescriptor.java File asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/IfMissingOrNullDescriptor.java: PS2, Line 91: missingBytes should ifnull(null, null) return null instead of missing? -- To view, visit https://asterix-gerrit.ics.uci.edu/1745 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id114f6654b9814c5aeca07fffeea04daeb8dca19 Gerrit-PatchSet: 2 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Dmitry Lychagin <[email protected]> Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Till Westmann <[email protected]> Gerrit-Reviewer: Yingyi Bu <[email protected]> Gerrit-HasComments: Yes
