Interface PqStruct

All Superinterfaces:
FieldAccessor, StructAccessor

public interface PqStruct extends StructAccessor

Type-safe struct interface for reading nested Parquet data.

Provides dedicated accessor methods for each type, similar to JDBC ResultSet. This interface is used for nested struct access, not for top-level row iteration. For top-level row access, use RowReader directly.

A PqStruct is a flyweight over the underlying read batch — its accessors resolve to column data on each call. The flyweight is valid for as long as the batch it was obtained from is current; it is not safe to hold across rowReader.next() calls.

while (rowReader.hasNext()) {
    rowReader.next();
    int id = rowReader.getInt("id");

    // Nested struct
    PqStruct address = rowReader.getStruct("address");
    String city = address.getString("city");

    // List of structs
    PqList items = rowReader.getList("items");
    for (PqStruct item : items.structs()) { ... }
}