* Default implementation for getting the approximate type info for the operator result.
* Divide operator overrides this.
* @return
*/
protected PrimitiveTypeInfo deriveResultApproxTypeInfo() {
PrimitiveTypeInfo left = (PrimitiveTypeInfo) TypeInfoUtils.getTypeInfoFromObjectInspector(leftOI);
PrimitiveTypeInfo right = (PrimitiveTypeInfo) TypeInfoUtils.getTypeInfoFromObjectInspector(rightOI);
// string types get converted to double
if (PrimitiveObjectInspectorUtils.getPrimitiveGrouping(left.getPrimitiveCategory())
== PrimitiveGrouping.STRING_GROUP) {
left = TypeInfoFactory.doubleTypeInfo;
}
if (PrimitiveObjectInspectorUtils.getPrimitiveGrouping(right.getPrimitiveCategory())
== PrimitiveGrouping.STRING_GROUP) {
right = TypeInfoFactory.doubleTypeInfo;
}
// Use type promotion