Github user KanakaKumar commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2687#discussion_r216123279
--- Diff:
store/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java ---
@@ -525,6 +559,11 @@ private static Field prepareFields(Schema.Field
avroField) {
int precision = ((LogicalTypes.Decimal)
childSchema.getLogicalType()).getPrecision();
int scale = ((LogicalTypes.Decimal)
childSchema.getLogicalType()).getScale();
return new Field(fieldName,
DataTypes.createDecimalType(precision, scale));
+ } else if (logicalType == null &&
childSchema.getObjectProp("logicalType")
--- End diff --
1) Why this specific check is required?
If this case is for invalid schema, AVRO should validate and throw error.
If avro consideres this case just like Bytes, we can also consider same. carbon
needs not have this specific check.
2) In the else case we should throw exception or leave to default case to
throw bytes is not supported exception.
---