Github user manishgupta88 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2671#discussion_r214024187
  
    --- Diff: 
store/sdk/src/main/java/org/apache/carbondata/sdk/file/AvroCarbonWriter.java ---
    @@ -310,6 +503,31 @@ private static Field prepareFields(Schema.Field 
avroField) {
             } else {
               return null;
             }
    +      case UNION:
    +        int i = 0;
    +        // Get union types and store as Struct<type>
    +        ArrayList<StructField> unionFields = new ArrayList<>();
    +        for (Schema avroSubField : avroField.schema().getTypes()) {
    +          StructField unionField = prepareSubFields(avroField.name() + 
i++, avroSubField);
    --- End diff --
    
    check for NULL schema here


---

Reply via email to