>From Ali Alsuliman <[email protected]>: Attention is currently required from: Murtadha Hubail, Peeyush Gupta, [email protected]. Ali Alsuliman has posted comments on this change. ( https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19006 )
Change subject: [WIP] Push projections into assign operators, change test plans ...................................................................... Patch Set 16: (15 comments) Patchset: PS16: Update the commit message as usual and include the Ext-ref: MB-XXXX File asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/base/RuleCollections.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19006/comment/afafa545_d3820160 PS16, Line 471: prepareForJobGenRewrites.add(new ReinferAllTypesRule()) Remove this. Add a comment before EmbedProjectRule: // EmbedProjectRule should run last. The assumption is that this rules set will run once File hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/AbstractAssignPOperator.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19006/comment/a0b80550_31fa69a2 PS16, Line 79: assign.getVariables() Replace all "assign.getVariables()" with "variables" from above. File hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/AbstractAssignOperator.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19006/comment/c12537f6_988f48c3 PS16, Line 38: private List<LogicalVariable> projectedExpressionVariables; Remove these unused variables. https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19006/comment/1c86eeab_0c491d61 PS16, Line 87: if (isProjectPushed()) { With this change, we need to change "AssignBatchPOperator". It's using "opSchema" to look up the input variables. It should be changed to use "inputSchemas". I am not sure if there are tests that use "AssignBatchPOperator". We should add some if there are not. File hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/AbstractProjectPushableOperator.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19006/comment/4aa59c0c_bc56bce5 PS16, Line 28: AbstractProjectPushableOperator Let's rename this to "AbstractProjectingOperator" https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19006/comment/b0b3b0ae_3cd1a834 PS16, Line 29: private List<LogicalVariable> projectVars; You can make this final https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19006/comment/cad97122_10e7f997 PS16, Line 37: Collection<LogicalVariable> Let's use List<LogicalVariable> to make sure the iteration is deterministic and ordered. https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19006/comment/a516d3c1_7e4d28bf PS16, Line 47: return projectPushed; We can remove this flag and instead use: return !projectVars.isEmpty(); File hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/LogicalOperatorPrettyPrintVisitor.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19006/comment/4acf9952_0dbc4ae8 PS16, Line 262: public static List<Mutable<ILogicalExpression>> getProjectedExpressionList(AbstractAssignOperator op) { Remove unused and commented code. https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19006/comment/cba1e9dd_bb6d086f PS16, Line 284: addIndent(indent).append(" with pushed projection : ").append(str(op.getProjectVariables())); Change this to: buffer.append(" project ").append(str(op.getProjectVariables())); File hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/LogicalOperatorPrettyPrintVisitorJson.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19006/comment/d2d1436d_0d54ba16 PS16, Line 576: // TODO : Add projection variables, isPushed state Add project variables if they exist. You can name the field "project-variables". File hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/utils/LogicalOperatorDotVisitor.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19006/comment/85a2c259_71661d29 PS16, Line 221: public static List<Mutable<ILogicalExpression>> getProjectedExpressionList(AbstractAssignOperator op) Remove unused code. File hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/EmbedProjectRule.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19006/comment/b1392f44_e84cfabb PS16, Line 30: public class EmbedProjectRule implements IAlgebraicRewriteRule { Add this doc: /** * This rule should run last during optimization. The assumption is that the rules set that includes this rule will run * only once (i.e. sequential once). */ File hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/UnnestRuntimeFactory.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19006/comment/a794f559_72e47f33 PS16, Line 42: public class UnnestRuntimeFactory extends AbstractOneInputOneOutputRuntimeFactory { Revert this change. -- To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19006 To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Change-Id: I2767a176bb1d7bd7722121b9b8d57a8e9cf9de2a Gerrit-Change-Number: 19006 Gerrit-PatchSet: 16 Gerrit-Owner: [email protected] Gerrit-Reviewer: Ali Alsuliman <[email protected]> Gerrit-Reviewer: Anon. E. Moose #1000171 Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Murtadha Hubail <[email protected]> Gerrit-Reviewer: Peeyush Gupta <[email protected]> Gerrit-Attention: Murtadha Hubail <[email protected]> Gerrit-Attention: Peeyush Gupta <[email protected]> Gerrit-Attention: [email protected] Gerrit-Comment-Date: Thu, 21 Nov 2024 00:08:01 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
