format/src/main/java/com/github/sadikovi/riff/TypeDescription.java
/**
   * Convert this type description into Spark SQL struct type.
   * @return struct type
   */
Convert this type description into Spark SQL struct type.
@return struct type
Convert this type description into Spark SQL struct type . @return struct type
public StructType toStructType() {
    StructType struct = new StructType();
    for (int i = 0; i < ordinalFields.length; i++) {
      struct = struct.add(ordinalFields[i].field());
    }
    return struct;
  }
public StructType toStructType ( ) { StructType struct = new StructType ( ) ; for ( int i = 0 ; i < ordinalFields . length ; i ++ ) { struct = struct . add ( ordinalFields [ i ] . field ( ) ) ; } return struct ; }
Convert this type description into Spark SQL struct type.
Convert this type description into Spark SQL struct type .
// StructField instances are immutable, therefore it is safe to pass them directly to // construct struct type