| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(parquet_reader), | intent(in) | :: | reader |
open reader. |
||
| character(len=*), | intent(in) | :: | name |
existing column name (dotted struct-leaf path allowed). |
||
| character(len=:), | intent(out), | allocatable | :: | type_name |
resolved canonical type token. |
Returns the Fortran type existing column name is READ INTO, in type_name: one of
valid_query_data_types's nine tokens ("int32"/"int64"/"float32"/"float64"/"string"/
"boolean"/"date"/"time"/"timestamp"), or "unknown" for a column this library cannot
read at all. A vector (FIXED_SIZE_LIST) column reports its element type, e.g. an int32
vector column reports "int32" (see parquet_get_col_size for its element count).
The question it answers is "what do I declare?", so the answer is the narrowest lossless Fortran kind for the column's physical type, not the physical type's own name -- all four numeric targets accept the same 15 physical types, so which one a read actually uses is chosen by the caller's declaration rather than by the file:
The two lossy rows return the conventional target rather than "unknown" on purpose: a caller asking what to declare is better served by the kind the library will actually use than by being told a readable column is unreadable.
error stops only if name doesn't exist -- that is a caller mistake, and
parquet_column_exists is the query for it. An unreadable type is an answer ("unknown"),
not an error.