TypeId compType = inputType.getTypeId();
CompilerContext cc = (CompilerContext)
ContextService.getContext(CompilerContext.CONTEXT_ID);
TypeCompilerFactory tcf = cc.getTypeCompilerFactory();
TypeCompiler tc = tcf.getTypeCompiler(compType);
/*
** If the class implements NumberDataValue, then we
** are in business. Return type is same as input
** type.
*/
if (compType.isNumericTypeId())
{
aggregatorClass.append(getAggregatorClassName());
DataTypeDescriptor outDts = tc.resolveArithmeticOperation(
inputType, inputType, getOperator());
/*
** SUM and AVG may return null
*/
return outDts.getNullabilityType(true);