SYMPTOM
Running a particular report from Tableau causes the following error in the Design Center:
- Error during query planning: Expected two arguments for a binary operator
The engine.log shows similar to below:
2018-08-08 20:07:20,091 WARN [atscale-akka.actor.default-dispatcher-16] {} com.atscale.engine.core.plan.SimplifyOperations - Error when trying to calculate corrected physical type for FunctionApplication(TimesFunction,List(ReferenceValue(Calendar_Month_Num,Some(XXXXXXXXX)), ConstantValue[IntType](100))) and FunctionApplication(TimesFunction,List(ConstantValue[IntType](100), ReferenceValue(Calendar_Month_Num,Some(XXXXXXXXX))))
java.lang.IllegalArgumentException: Expected two arguments for a binary operator, got List(IntType)
at com.atscale.engine.core.plan.NumericFunction$.com$atscale$engine$core$plan$NumericFunction$$promotePair(functions.scala:699)
at com.atscale.engine.core.plan.NumericFunction$TimesFunction$.physicalType(functions.scala:715)
at com.atscale.engine.core.plan.FunctionApplication.physicalType(functions.scala:979)
...
ROOT CAUSE
This warning might be caused when the inbound query from Tableau does not cast some columns to the right column types.
For example, there is an attribute named "Calendar Month Num", and this data type is String, and in the Tableau worksheet, a user is multiplying this attribute without explicitly casting it to Integer.
RESOLUTION
Review your worksheet and explicitly cast the data type.