@@ -111,11 +111,6 @@ public AggBinaryOp(String l, DataType dt, ValueType vt, OpOp2 innOp,
111111 refreshSizeInformation ();
112112 }
113113
114- @ Override
115- public void checkArity () {
116- HopsException .check (_input .size () == 2 , this , "should have arity 2 but has arity %d" , _input .size ());
117- }
118-
119114 public void setHasLeftPMInput (boolean flag ) {
120115 _hasLeftPMInput = flag ;
121116 }
@@ -387,34 +382,32 @@ protected ExecType optFindExecType(boolean transitive)
387382 {
388383 checkAndSetForcedPlatform ();
389384
390- if ( _etypeForced != null )
391- {
392- _etype = _etypeForced ;
385+ if ( _etypeForced != null ) {
386+ setExecType (_etypeForced );
393387 }
394388 else
395389 {
396- if ( OptimizerUtils .isMemoryBasedOptLevel () )
397- {
398- _etype = findExecTypeByMemEstimate ();
390+ if ( OptimizerUtils .isMemoryBasedOptLevel () ) {
391+ setExecType (findExecTypeByMemEstimate ());
399392 }
400393 // choose CP if the dimensions of both inputs are below Hops.CPThreshold
401394 // OR if it is vector-vector inner product
402395 else if ( (getInput ().get (0 ).areDimsBelowThreshold () && getInput ().get (1 ).areDimsBelowThreshold ())
403396 || (getInput ().get (0 ).isVector () && getInput ().get (1 ).isVector () && !isOuterProduct ()) )
404397 {
405- _etype = ExecType .CP ;
398+ setExecType ( ExecType .CP ) ;
406399 }
407400 else
408401 {
409- _etype = ExecType .SPARK ;
402+ setExecType ( ExecType .SPARK ) ;
410403 }
411404
412405 //check for valid CP mmchain, send invalid memory requirements to remote
413406 if ( _etype == ExecType .CP
414407 && checkMapMultChain () != ChainType .NONE
415408 && OptimizerUtils .getLocalMemBudget () <
416409 getInput ().get (0 ).getInput ().get (0 ).getOutputMemEstimate () ) {
417- _etype = ExecType .SPARK ;
410+ setExecType ( ExecType .SPARK ) ;
418411 }
419412
420413 //check for valid CP dimensions and matrix size
@@ -429,7 +422,7 @@ && checkMapMultChain() != ChainType.NONE
429422 || ( !mmtsj .isRight () && isApplicableForTransitiveSparkExecType (false ))) )
430423 {
431424 //pull binary aggregate into spark
432- _etype = ExecType .SPARK ;
425+ setExecType ( ExecType .SPARK ) ;
433426 }
434427
435428 //mark for recompile (forever)
0 commit comments