Github user sounakr commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2347#discussion_r191404125
--- Diff:
store/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java ---
@@ -221,13 +255,22 @@ private static Field prepareFields(Schema.Field
avroField) {
private static StructField prepareSubFields(String FieldName, Schema
childSchema) {
Schema.Type type = childSchema.getType();
+ LogicalType logicalType = childSchema.getLogicalType();
switch (type) {
case BOOLEAN:
return new StructField(FieldName, DataTypes.BOOLEAN);
case INT:
- return new StructField(FieldName, DataTypes.INT);
+ if (logicalType == null) {
+ return new StructField(FieldName, DataTypes.INT);
--- End diff --
Make the checks in sync with avroFieldToObject logicaltype checks
---