sebwrede commented on a change in pull request #1051:
URL: https://github.com/apache/systemds/pull/1051#discussion_r486407377
##########
File path:
src/main/java/org/apache/sysds/runtime/instructions/spark/SPInstruction.java
##########
@@ -41,16 +41,15 @@
}
protected final SPType _sptype;
- protected final Operator _optr;
protected final boolean _requiresLabelUpdate;
protected SPInstruction(SPType type, String opcode, String istr) {
this(type, null, opcode, istr);
}
protected SPInstruction(SPType type, Operator op, String opcode, String
istr) {
+ super(op);
Review comment:
Because they all have the same field, but it was written in each of the
classes. I placed it into their super class (Instruction) and then decided that
calling the super constructor is a good idea, since we would then be able to
change the way the operator is set for all subclasses by changing the
Instruction constructor.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]