Dmitry Lychagin has posted comments on this change. Change subject: [ASTERIXDB-2415][COMP] Type inference fix in InjectTypeCastForSwitchCaseRule ......................................................................
Patch Set 5: (1 comment) https://asterix-gerrit.ics.uci.edu/#/c/2769/5/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/InjectTypeCastForSwitchCaseRule.java File asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/InjectTypeCastForSwitchCaseRule.java: Line 94: env = context.getOutputTypeEnvironment(op); you're trying to handle a case where the function is in the join condition, right? In this case you should type check it in the environment that is a union of all inputs. It can be created AbstractOperator.createPropagatingAllInputsTypeEnvironment(). Using the join operator output environment is not correct. Currently it contains all vars from both inputs because we only support inner/outer joins. However when we add anti/semi joins their output environment will only contain vars from the left branch. That's why we need to use createPropagatingAllInputsTypeEnvironment() to type check expressions inside binary operators, because those expressions see variables from all inputs, but the operator itself may not emit all inputs. -- To view, visit https://asterix-gerrit.ics.uci.edu/2769 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7c18bc58381bab2c25d1e58ee7bab7f1b2aaf440 Gerrit-PatchSet: 5 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Xikui Wang <[email protected]> Gerrit-Reviewer: Anon. E. Moose #1000171 Gerrit-Reviewer: Dmitry Lychagin <[email protected]> Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-HasComments: Yes
