Interface RowReader
- All Superinterfaces:
AutoCloseable, FieldAccessor, StructAccessor
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 Summary
Methods inherited from interface FieldAccessor
getBinary, getBoolean, getDate, getDecimal, getDouble, getFieldCount, getFieldName, getFloat, getInt, getInterval, getLocalTimestamp, getLong, getRawValue, getString, getTime, getTimestamp, getUuid, getValue, getVariant, isNullMethods inherited from interface StructAccessor
getBinary, getBoolean, getDate, getDecimal, getDouble, getFloat, getInt, getInterval, getList, getList, getLocalTimestamp, getLong, getMap, getMap, getRawValue, getString, getStruct, getStruct, getTime, getTimestamp, getUuid, getValue, getVariant, isNull
-
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:
closein interfaceAutoCloseable
-