You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A side effect of the eclairjs node code generation is a number of spark objects are treated as immutable, thereby making the nodejs spark api not work the same as the normal spark api.
for instance, the following code will not work
var paramMap2 = new spark.ml.param.ParamMap();
paramMap2.put(lr.probabilityCol().w("myProbability")); // Change output column name
var paramMapCombined = paramMap.$plus$plus(paramMap2);
because the $plus$plus will be executed before the paramMap2.put is executed.
This can be worked around by instead doing
var paramMap3 = paramMap2.put(lr.probabilityCol().w("myProbability"));
var paramMapCombined = paramMap.$plus$plus(paramMap3);
but it is not obvious to the eclairjs user when that should be done, because with the normal spark programing (including eclairjs nashorn) it is not necessary.
The text was updated successfully, but these errors were encountered:
A side effect of the eclairjs node code generation is a number of spark objects are treated as immutable, thereby making the nodejs spark api not work the same as the normal spark api.
for instance, the following code will not work
because the $plus$plus will be executed before the paramMap2.put is executed.
This can be worked around by instead doing
but it is not obvious to the eclairjs user when that should be done, because with the normal spark programing (including eclairjs nashorn) it is not necessary.
The text was updated successfully, but these errors were encountered: