format/src/main/java/com/github/sadikovi/riff/TypeDescription.java
/** Check if schema is valid, contains supported types */
Check if schema is valid, contains supported types
Check if schema is valid contains supported types
private void assertSchema(StructType schema) {
    if (schema == null || schema.fields().length < 1) {
      throw new UnsupportedOperationException(
        "Schema has insufficient number of columns, " + schema + ", expected at least one column");
    }
    for (StructField field : schema.fields()) {
      if (!isSupportedDataType(field.dataType())) {
        throw new UnsupportedOperationException("Field " + field + " with type " +
          field.dataType() + " is not supported");
      }
    }
  }
private void assertSchema ( StructType schema ) { if ( schema == null || schema . fields ( ) . length < 1 ) { throw new UnsupportedOperationException ( "Schema has insufficient number of columns, " + schema + ", expected at least one column" ) ; } for ( StructField field : schema . fields ( ) ) { if ( ! isSupportedDataType ( field . dataType ( ) ) ) { throw new UnsupportedOperationException ( "Field " + field + " with type " + field . dataType ( ) + " is not supported" ) ; } } }
Check if schema is valid, contains supported types
Check if schema is valid contains supported types