>From Glenn Galvizo <[email protected]>: Attention is currently required from: Wail Alkowaileet, Sushrut Borkar. Glenn Galvizo has posted comments on this change. ( https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17294 )
Change subject: [NO ISSUE][HYR] Added switch operator ...................................................................... Patch Set 2: (7 comments) File hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/SwitchOperator.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17294/comment/465e8be9_257352dd PS2, Line 36: private final HashMap<Integer, int[]> outputMapping; use Map<> interface instead (in case people want to use something else other than HashMap) File hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/visitors/OperatorDeepCopyVisitor.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17294/comment/7d41ecf0_fc303ce9 PS2, Line 185: public ILogicalOperator visitSwitchOperator(SwitchOperator op, Void arg) throws AlgebricksException { split seems incorrect here -- use deepCopyExpressionRef(op.getBranching...) instead. if you want to, feel free to update this in the split operator as well File hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/SwitchOperatorDescriptor.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17294/comment/a0d4c23e_bc8460b9 PS2, Line 74: HashMap<Integer, int[]> outputMapping) { same comment from the logical operator, use Map instead of HashMap https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17294/comment/60e8f6a2_e9fe2c7c PS2, Line 75: super(spec, rDesc, outputArity); we never materialize here, so you should probably add a sanity check here (check that numberOfNonMaterializedOutputs is equal to outputArity) https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17294/comment/7998df31_9edebf25 PS2, Line 92: private final class SwitcherMaterializerActivityNode extends ReplicatorMaterializerActivityNode { - remove Materializer from the name, we aren't doing any materialization - also, are you overriding anything from ReplicatorMaterializerActivityNode? it looks like it makes more sense to extend AbstractActivityNode https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17294/comment/47177153_85daa78a PS2, Line 103: final IFrameWriter[] writers = new IFrameWriter[numberOfNonMaterializedOutputs]; if you add the sanity check that asserts numberOfNonMaterializedOutputs = outputArity, i would use outputArity here (and the rest of the class) instead to make it clear that no materialization is happening https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17294/comment/6dc779bd_cbc3295a PS2, Line 118: return new AbstractUnaryInputOperatorNodePushable() { can you add a flush() action here too? the base class doesn't have it (and split doesn't either), but we need it for Graphix :-) this would loop through each appender and flush whatever they have. -- To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17294 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: Iba4f46a9d1ea7b8cadd7cca250d43576ad036438 Gerrit-Change-Number: 17294 Gerrit-PatchSet: 2 Gerrit-Owner: Sushrut Borkar <[email protected]> Gerrit-Reviewer: Anon. E. Moose #1000171 Gerrit-Reviewer: Glenn Galvizo <[email protected]> Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Wail Alkowaileet <[email protected]> Gerrit-Attention: Wail Alkowaileet <[email protected]> Gerrit-Attention: Sushrut Borkar <[email protected]> Gerrit-Comment-Date: Tue, 29 Nov 2022 21:19:35 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
