Interface RowReader

All Superinterfaces:
AutoCloseable, FieldAccessor, StructAccessor

public interface RowReader extends StructAccessor, AutoCloseable

Provides row-oriented iteration over a Parquet file.

A RowReader is a stateful, mutable view providing access to the current row in the iterator. The values returned by its accessors change between calls of next().

Usage example:

try (RowReader rowReader = fileReader.rowReader()) {
    while (rowReader.hasNext()) {
        rowReader.next();
        long id = rowReader.getLong("id");
        PqStruct address = rowReader.getStruct("address");
        String city = address.getString("city");
    }
}
  • Method Details

    • hasNext

      boolean hasNext()
      Check if there are more rows to read.
      Returns:
      true if there are more rows available
    • next

      void next()
      Advance to the next row. Must be called before accessing row data.
      Throws:
      NoSuchElementException - if no more rows are available
    • close

      void close()
      Specified by:
      close in interface AutoCloseable