/** * Returns a {@link SchemaCoder} for the specified class. If no schema is registered for this * class, then throws {@link NoSuchSchemaException}. */ public static <T> SchemaCoder<T> of( Schema schema, SerializableFunction<T, Row> toRowFunction, SerializableFunction<Row, T> fromRowFunction) { return new SchemaCoder<>(schema, toRowFunction, fromRowFunction); }
/** Returns a {@link SchemaCoder} for {@link Row} classes. */ public static SchemaCoder<Row> of(Schema schema) { return new SchemaCoder<>( schema, SerializableFunctions.identity(), SerializableFunctions.identity()); }