* INTERNAL:
* Build HSQL equivalent to GREATEST(x, y)
* HSQL: CASE WHEN x >= y THEN x ELSE y
*/
protected ExpressionOperator greatest() {
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setType(ExpressionOperator.FunctionOperator);
exOperator.setSelector(ExpressionOperator.Greatest);
Vector v = org.eclipse.persistence.internal.helper.NonSynchronizedVector.newInstance(5);
v.addElement("CASEWHEN(");
v.addElement(" >= ");
v.addElement(", ");
v.addElement(", ");
v.addElement(")");
exOperator.printsAs(v);
exOperator.bePrefix();
int[] indices = {0, 1, 0, 1};
exOperator.setArgumentIndices(indices);
exOperator.setNodeClass(ClassConstants.FunctionExpression_Class);
return exOperator;
}