Aha! yes, while
DOUBLE both say that you want a variable that is floating point, they are not the same thing - there’s a key difference:
DOUBLE tells the spark cloud what the type of the variable is - the information is accessible to your program.
double tells the compiler to allocate space for a floating point variable. This information is not accessible to your program (your program can’t ask - what’s the type of this variable? - the compiler assumes you know.)
So you see that
double is used to allocate the variable to begin with. while
DOUBLE has to be used to register the variable to the cloud,