class DataFrameToIterableRow implements Function<Dataset<Row>, Iterable<? extends Row>> {

    @Override
    public Iterable<? extends Row> apply(final Dataset<Row> dataset) {
        return dataset::toLocalIterator;
    }

}