default Iterator<Record> spliterator() {
        return new Iterator<Record>() {
            Optional<Record> nextData = Optional.empty();

            @Override
            public boolean hasNext() {
                if (nextData.isPresent()) {
                    return true;
                } else {
                    if (StreamingDataSet.this.next()) {
                        nextData = getRecord();
                    } else {
                        nextData = Optional.empty();
                    }
                    return nextData.isPresent();
                }
            }

            @Override
            public Record next() {
                if (nextData.isPresent() || hasNext()) {
                    final Record line = nextData.get();
                    nextData = Optional.empty();
                    return line;
                } else {
                    throw new NoSuchElementException();
                }
            }
        };
    }