Dmitry Lychagin has posted comments on this change. Change subject: [NO ISSUE][COMP] Optim rules comments + minor changes ......................................................................
Patch Set 3: (1 comment) https://asterix-gerrit.ics.uci.edu/#/c/3201/3/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/CheckFilterExpressionTypeRule.java File asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/CheckFilterExpressionTypeRule.java: PS3, Line 66: IVariableTypeEnvironment env = context.getOutputTypeEnvironment(select); : if (env == null) { : env = select.computeOutputTypeEnvironment(context); : } > // Edit: I think lines 67-69 are not be needed (if env == null ... ). After the first InferTypesRule the context is always supposed to contain type environments for all operators in the plan. Each rule that introduces new operators must compute their type environments and add to the context. If an operator exists without its type environment in the context then it's a bug. The bottom line is that we just need to call context.getOutputTypeEnvironment(select) here to get select's type environment. It's a responsibility of other rules to guarantee that it's available and if it's not then it's a bug. -- To view, visit https://asterix-gerrit.ics.uci.edu/3201 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6f5cb78125657ff2bb4658af40bfc9d9cbff184e Gerrit-PatchSet: 3 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: Hussain Towaileb <[email protected]> Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-HasComments: Yes
