case DECIMAL:
SettableHiveDecimalObjectInspector decimalOi = (SettableHiveDecimalObjectInspector) toOi;
return decimalOi.create((HiveDecimal) fromPoi.getPrimitiveJavaObject(from));
case CHAR:
SettableHiveCharObjectInspector charOi = (SettableHiveCharObjectInspector) toOi;
return charOi.create((HiveChar) fromPoi.getPrimitiveJavaObject(from));
case VARCHAR:
SettableHiveVarcharObjectInspector varcharOi = (SettableHiveVarcharObjectInspector) toOi;
return varcharOi.create((HiveVarchar) fromPoi.getPrimitiveJavaObject(from));
case VOID:
throw new IllegalArgumentException("Void type is not supported yet");