| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(parquet_reader), | intent(inout) | :: | reader |
open, unsorted reader with no column decoded yet. |
||
| type(parquet_sortkey), | intent(in) | :: | sort_by |
sort keys, parsed and validated here. |
Applies sort_by to an already-open reader, exactly as
parquet_open_reader(..., sort_by=) would have: every column read
from here on -- and every column already decoded -- comes back in
key order. Provided for the same reasons parquet_reader_set_filter
is: a caller that does not own the parquet_open_reader call, or one
that can only choose its keys after inspecting the file's schema.
Refuses, with error stop, in three states: when the reader already has a sort (add every key to one parquet_sortkey instead), when any column has already been decoded on this reader (data already handed back could not then be aligned with anything read afterwards), and when a chunked read has already been done (its rows were handed back in physical row-group order, which no permutation can reconcile). The last two are separate checks because a chunked read caches nothing, so the decoded-columns predicate cannot see it. A reader opened with filter= or sample_fraction= is fine: the sort orders the surviving rows -- that is the supported order, and the reverse (set_filter under an active sort) is refused by set_filter itself.