Procedures

ProcedureLocationProcedure TypeDescription
check_oracle parquet_argsort Subroutine

Aborts if the C++ engine was selected without being bound.

Read more…
drive_engine parquet_argsort Interface
drive_engine_grouped parquet_argsort Interface
ek_rnd parquet_expkey Function

The rounding barrier: an identity that the optimiser may not fuse across.

Read more…
engine_build_runs parquet_argsort Interface
exp_key parquet_expkey Function

-log(u) for u in [2**-53, 1], using only IEEE + - * /. Not a general-purpose log.

Read more…
exp_key_contract_ok parquet_expkey Function

Re-derives the frozen transform over 32 fixed inputs and compares against ek_contract_fp.

Read more…
extract_bool parquet_argsort Interface
extract_chr parquet_argsort Interface
extract_f32 parquet_argsort Interface
extract_f64 parquet_argsort Interface
extract_i32 parquet_argsort Interface
extract_i64 parquet_argsort Interface
fill_identity parquet_argsort Interface
fold_ascii_lower parquet_settings_base Subroutine

Lowercases ASCII letters. A local copy rather than parquet_to_lower, because that one lives in parquet_core, which uses THIS module -- importing it back would be a circular dependency.

get_parquet_maml parquet_maml_base Function

Returns the named embedded .maml fixture from schemas/ as a raw parquet_maml_file (unparsed lines only); error stops on an unknown name. A fixture is matched by its filename, with or without the .maml extension; one held in a subdirectory is also matched by its full relative path.

narrow_offsets parquet_argsort Interface
narrow_perm parquet_argsort Interface
oracle_argsort parquet_argsort Subroutine

Relays onto the oracle's procedure pointers, and they exist for a COMPILER reason rather than a design one -- do not inline them back into the callers.

Read more…
oracle_is_sorted parquet_argsort Subroutine

Relay onto p_is_sorted; see oracle_argsort for why these exist.

oracle_merge parquet_argsort Subroutine

Relay onto p_merge; see oracle_argsort for why these exist.

oracle_nth parquet_argsort Subroutine

Relay onto p_nth; see oracle_argsort for why these exist.

oracle_partial parquet_argsort Subroutine

Relay onto p_partial; see oracle_argsort for why these exist.

oracle_runs parquet_argsort Subroutine

Relay onto p_runs; see oracle_argsort for why these exist.

oracle_search parquet_argsort Subroutine

Relay onto p_search; see oracle_argsort for why these exist.

parquet_argsort_bind_oracle parquet_argsort Subroutine

Binds the seven C++-engine entry points. Called by parquet_sorting_oracle, and by nothing else; idempotent, so calling it on every engine selection costs nothing.

parquet_argsort_select_engine parquet_argsort Subroutine

Selects which engine the dispatchers run. TEST-ONLY, and reached only through parquet_sorting_oracle's parquet_debug_use_fortran_sort_engine.

parquet_auto_thread_count parquet_settings_base Function

The library's one copy of the automatic thread rule: how many threads an operation that was given no explicit threads= should use right now, under a caller-supplied cap.

Read more…
parquet_clamp_to_affinity parquet_settings_base Function

Lowers n to the number of processors this process's CPU affinity actually allows, and says so once per process when that clamp bites.

Read more…
parquet_close_reader parquet_core Interface
parquet_close_writer parquet_core Interface
parquet_column_any_null parquet_columns Interface
parquet_column_clear_null parquet_columns Interface
parquet_column_data_ptr parquet_columns Interface
parquet_column_exists parquet_core Interface
parquet_column_get_at parquet_columns Interface
parquet_column_get_elem parquet_columns Interface
parquet_column_has_nulls parquet_core Interface

Whether name contains any Null over the 1-based inclusive row-group range row_group_lo..row_group_hi, answered from the file's own statistics. Both bounds are accepted as integer(int32) or integer(int64); row_group_lo <= 0 means "every row group".

Read more…
parquet_column_is_null parquet_columns Interface
parquet_column_set_at parquet_columns Interface
parquet_column_set_elem parquet_columns Interface
parquet_column_set_null parquet_columns Interface
parquet_column_string_column parquet_columns Interface
parquet_column_width_needs_data parquet_core Interface
parquet_compose_read_qc parquet_core Interface
parquet_date parquet_temporal Interface

Constructs a valid parquet_date from (year, month, day); aborts on an invalid civil date (the structure constructor itself is unavailable outside this module -- components are private -- so this generic takes its place).

parquet_debug_colread_block_rows parquet_tables Interface
parquet_debug_exp_key parquet_expkey Function

exp_key under a public name. Test-only.

Read more…
parquet_debug_gamma_path parquet_random Subroutine

Runs the Philox block function directly, on raw counter and key words. Test-only.

Read more…
parquet_debug_normal_path parquet_random Subroutine
parquet_debug_perm_config parquet_sampling Subroutine

Reports the permutation kernel's effective configuration. Test-only.

Read more…
parquet_debug_poisson_path parquet_random Subroutine

Reports which algorithm and branch a %poisson draw took. Test-only; see parquet_debug_normal_path.

Read more…
parquet_debug_random_block parquet_random Subroutine
parquet_debug_random_bulk_threads parquet_sampling Function

Exposes random_threads for testing. Test-only; no library code calls it.

Read more…
parquet_debug_random_uses_int128 parquet_random Function

Reports which side of the route (e) fork was compiled. Test-only.

Read more…
parquet_debug_random_uses_safe64 parquet_random Function

Reports whether the OVERFLOW-FREE 64-bit arm was compiled. Test-only.

Read more…
parquet_debug_reset_affinity_warning parquet_settings_base Subroutine

Clears the once-per-process claim on the affinity-clamp warning. Test-only.

Read more…
parquet_debug_reset_sort_radix_passes parquet_argsort Interface
parquet_debug_set_affinity_procs parquet_settings_base Subroutine

Overrides the processor count parquet_clamp_to_affinity clamps to. Test-only; <= 0 restores the real omp_get_num_procs().

Read more…
parquet_debug_set_exp_key_contract parquet_expkey Subroutine

Forces the frozen-transform check to fail. Test-only.

Read more…
parquet_debug_set_perm_force_feistel parquet_sampling Subroutine

Sends m <= perm_exact_max through the Feistel. Test-only; see the two hooks above.

parquet_debug_set_perm_parity parquet_sampling Subroutine

Enables or disables the parity correction. Test-only; see parquet_debug_set_perm_rounds.

parquet_debug_set_perm_rounds parquet_sampling Subroutine

Forces the Feistel round count. Test-only. n <= 0 restores the compiled-in value.

Read more…
parquet_debug_set_sort_counting_max_threads parquet_argsort Interface
parquet_debug_set_sort_depth_limit parquet_argsort Interface
parquet_debug_set_sort_engine_min_rows parquet_argsort Interface
parquet_debug_set_sort_radix_fail_alloc parquet_argsort Interface
parquet_debug_set_sort_radix_min_rows parquet_argsort Interface
parquet_debug_set_sort_split_min_card parquet_argsort Interface
parquet_debug_set_sort_tail_min_rows parquet_argsort Interface
parquet_debug_set_sort_task_floor parquet_argsort Interface
parquet_debug_set_sort_track_shift parquet_argsort Interface
parquet_debug_set_string_max_auto_threads parquet_strings Subroutine

Overrides the ceiling on the AUTOMATIC thread count. Test-only; <= 0 restores the real STRING_MAX_AUTO_THREADS. Public for the same reason its sibling above is.

parquet_debug_set_string_min_bytes parquet_strings Subroutine

Overrides the payload floor below which a bulk operation stays serial. Test-only; <= 0 restores the real STRING_MIN_BYTES.

Read more…
parquet_debug_set_weighted_int32_limit parquet_sampling Subroutine

Lowers the population ceiling the three int32-index refusals test against. Test-only.

Read more…
parquet_debug_sort_design parquet_argsort Interface
parquet_debug_sort_heapsort_calls parquet_argsort Interface
parquet_debug_sort_keys_compare parquet_sorting Interface
parquet_debug_sort_max_insertion_shift parquet_argsort Interface
parquet_debug_sort_radix_passes parquet_argsort Interface
parquet_debug_sort_refine_runs parquet_argsort Interface
parquet_debug_sort_row_less parquet_sorting Interface
parquet_debug_sort_split_buckets parquet_argsort Interface
parquet_debug_sort_sweep_compare parquet_sorting Interface
parquet_debug_sort_sweep_less parquet_sorting Interface
parquet_debug_sort_threads_used parquet_argsort Interface
parquet_debug_string_bulk_threads parquet_strings Function

What a bulk operation over col would actually resolve to, floor and all. Test-only.

Read more…
parquet_debug_string_row_ranges parquet_strings Subroutine

Exposes thread_row_ranges for testing. Test-only; no library code calls it.

Read more…
parquet_debug_table_drop_name_index parquet_tables Interface
parquet_debug_table_set_inflight parquet_tables Interface
parquet_debug_use_fortran_sort_engine parquet_sorting_oracle Subroutine

Test-only switch routing pf_argsort and friends to the Fortran engine, or back to C++.

Read more…
parquet_debug_using_fortran_sort_engine parquet_argsort Interface
parquet_emit_error_context parquet_settings_base Subroutine

Emits one line of context belonging to an error that is about to abort.

Read more…
parquet_emit_info parquet_settings_base Subroutine

Emits one informational remark -- something worth mentioning that is not a warning about the data. Suppressed from "silent" downward.

Read more…
parquet_emit_warning parquet_settings_base Subroutine

Emits one warning about the data or the schema. Suppressed only at "errors_only".

Read more…
parquet_finish_row_group parquet_core Interface
parquet_get_arrow_threads parquet_settings Function

Reports Arrow's current global CPU thread-pool capacity -- what parquet_set_arrow_threads last set it to, or Arrow's own hardware-derived default if it was never set. The counterpart to parquet_set_arrow_threads, and the answer to "how many threads will Arrow actually use here".

parquet_get_arrow_version parquet_settings Subroutine

Returns the version of the Arrow/Parquet C++ libraries this program is actually built against, formatted "major.minor.patch". mode absent or mode="arrow" reports the linked Arrow library's RUNTIME version -- what is loaded now, which need not be what the wrapper was compiled against; mode="parquet" reports the Parquet C++ library version the wrapper was COMPILED against. Any other mode value is an error.

Read more…
parquet_get_chunk_size parquet_core Interface

Returns writer_or_reader's row-group size ("chunk_size", matching parquet_open_writer's own chunk_size argument name -- Arrow's own WriteTable convenience function uses this same term for the concept). For a parquet_writer: the caller's own explicit chunk_size, validated against every declared vector column, or -- if chunk_size was never set -- an estimate computed from the schema's declared types/col_size. Usable at any point after parquet_open_writer, including before any column has been written, and it does not change afterwards: parquet_new_row_group's own nrows is what sizes each streamed row group and never feeds back into this value, and a writer that only uses parquet_write_column has its row groups sized at parquet_close_writer from the finished table's real byte size, which a schema-only estimate here cannot anticipate. So on the write side this is a suggestion for a chunked-write loop, not a promise about the file's final layout. For a parquet_reader: the row group's size at row_group (1-based; omitted defaults to the first row group), reflecting the file's actual, already-written-and-fixed layout -- row groups are not guaranteed uniform, so it is only ever a suggestion for a chunked-read loop there too.

parquet_get_col_size parquet_core Interface
parquet_get_column_names parquet_core Interface
parquet_get_column_nullable parquet_core Interface
parquet_get_column_time_info parquet_core Interface
parquet_get_column_total_elements parquet_core Interface

Returns the total element count of a vector (array) column named name, read from an open parquet_reader (reader), across every row (i.e. nrows * col_size) in total_elements, dispatched by its integer(int32)/integer(int64) kind. Reads no column data for a scalar or FIXED_SIZE_LIST column (nrows and col_size are both already known from the file footer/schema), so this is safe to call even on a column whose total element count itself exceeds int32 -- unlike an earlier implementation, which materialized the whole column just to answer this query and could hit Arrow's own int32 list-index ceiling on a large enough column (see CLAUDE.md's "Guarding a hard Arrow int32-only ceiling"). A plain LIST/LARGE_LIST column has no schema-level width, so it is measured one row group at a time by the same helper parquet_get_col_size uses -- data is read, but never more than one row group at once.

parquet_get_column_type parquet_core Interface
parquet_get_default_compression parquet_settings Subroutine

Reports the codec a writer opened with no compression= would use -- the value set here, or "zstd" if it was never set.

parquet_get_default_compression_level parquet_settings Function

Reports the compression level applied to a writer opened with no compression arguments at all -- the value set here, or 3 (this library's level for its own default zstd) if it was never set. Naming a codec explicitly, by argument or by parquet_set_default_compression, does not attach this level to it; see that procedure.

parquet_get_default_use_threads parquet_settings Function

Reports the default for use_threads= on a newly opened reader or writer.

parquet_get_file_date parquet_settings Subroutine

Reports the pinned file date, or "" when the clock is being read (the factory default).

Read more…
parquet_get_message_stream parquet_settings_base Subroutine

Reports the current message stream as the same token parquet_set_message_stream accepts.

parquet_get_metadata parquet_core Interface

Reads back one key's value from the flat key-value table metadata a parquet_writer wrote via add_metadata (see parquet_reader%metadata, populated once by parquet_open_reader). value's declared type/kind selects the specific procedure, so it also selects which stored representation is expected -- the stored string (always written by add_metadata as plain text, see parquet_metadata.f90) is parsed back into that type. Any key is allowed, including the writer's own reserved/internal keys (e.g. "DATE", "column..unit").

Read more…
parquet_get_metadata_items parquet_core Interface
parquet_get_nrows parquet_core Interface

Returns reader's post-filter row count in nrows, dispatched by its integer(int32)/integer(int64) kind (the int32 specific also error stops if the actual row count overflows int32). check_positive (optional, default .false.): if .true., error stops instead of returning 0 rows.

parquet_get_num_row_groups parquet_core Interface

Returns reader's row-group count in num_row_groups, dispatched by its integer(int32)/integer(int64) kind (the int32 specific also error stops if the actual count overflows int32 -- vanishingly unlikely in practice, but kept for consistency with parquet_get_nrows's own int32/int64 overload). Reflects the file's physical layout; unaffected by any filter= given to parquet_open_reader. See "Streaming/chunked reads" in doc/pages/io/reading.md for the chunked-read loop this and parquet_get_chunk_size/ parquet_read_column_chunk are meant to be used together for.

parquet_get_physical_row_indices parquet_core Interface
parquet_get_prefetch_threads parquet_settings Function

Reports the prefetch thread cap, or 0 if left automatic.

parquet_get_qc_columns parquet_core Interface
parquet_get_random_parallel_min_elements parquet_settings_base Function

The configured work floor, in elements per thread, for a bulk permutation/subset.

parquet_get_random_threads parquet_settings_base Function

The configured cap on threads inside one bulk permutation/subset; 0 means automatic.

parquet_get_sort_counting_bucket_limit parquet_settings_base Function

Reports the counting path's bucket ceiling -- the EFFECTIVE value, so a program that never set it is told 4194304 rather than the 0 that is stored.

parquet_get_sort_counting_path parquet_settings_base Function

Reports whether the sort's integer counting fast path is allowed.

parquet_get_sort_radix_path parquet_settings_base Function

Reports whether the sort's single-key radix fast path is allowed.

parquet_get_sort_threads parquet_settings_base Function

Reports the sort thread cap, or 0 if sorting is left automatic. This is the raw setting, not the resolved count -- ask pf_sort_threads() for the number a sort would actually use here, which additionally accounts for the OpenMP environment and for being inside a parallel region.

parquet_get_statistics_prescreen parquet_settings Function

Reports whether the reader's row-group statistics screen is enabled.

parquet_get_string_length parquet_core Interface
parquet_get_string_threads parquet_settings_base Function

The configured cap on threads inside one string-column bulk operation; 0 means automatic.

parquet_get_table_threads parquet_settings Function

Reports the table-mutation thread cap, or 0 if left automatic.

parquet_get_target_row_group_bytes parquet_settings Function

Reports the row-group byte target -- the EFFECTIVE value, so a program that never set it is told 268435456 rather than the 0 that is stored.

parquet_get_verbosity parquet_settings_base Subroutine

Reports the current verbosity as the same token parquet_set_verbosity accepts.

parquet_get_version parquet_version Subroutine

Returns this library's own version string. Default (mode absent): the RELEASE_VERSION build macro's bare release number; emits an informational remark first if that disagrees with cversion (a hand-maintained "vX.Y.Z (date)" string), which signals a build that skipped fpm's macro substitution or a version bump missed on one side. mode="internal" instead returns cversion verbatim. Any other mode value is an error -- in particular the linked Arrow and Parquet C++ library versions are reported by parquet_get_arrow_version, not by this procedure.

parquet_kind_name parquet_columns Subroutine

Copies a human-readable name for a PK_* kind out (for error messages and callers that dispatch on kindof).

parquet_load_maml_file parquet_core Interface
parquet_load_qc_maml_file parquet_core Interface
parquet_maml_maml_example parquet_maml_base Function

Returns the embedded maml_example.maml MAML fixture, unparsed (raw lines only).

parquet_maml_maml_example2 parquet_maml_base Function

Returns the embedded maml_example2.maml MAML fixture, unparsed (raw lines only).

parquet_maml_maml_example3 parquet_maml_base Function

Returns the embedded maml_example3.maml MAML fixture, unparsed (raw lines only).

parquet_measure_list_width parquet_core Interface

Measures the uniform element-count-per-row (width) of a plain Parquet LIST/LARGE_LIST column, over the 1-based inclusive row-group range row_group_lo..row_group_hi, without ever materializing the whole column. Both bounds are accepted as integer(int32) or integer(int64); row_group_lo <= 0 means "every row group in the file".

Read more…
parquet_nested_team_unsafe parquet_settings_base Function

Whether opening a thread team here would build the shape libgomp deadlocks on.

Read more…
parquet_new_row_group parquet_core Interface

Starts a new row group of nrows rows on writer -- see parquet_write_column_chunk below. Every column already known to writer (whether schema-declared or already chunk-written for an earlier row group) must then receive exactly one parquet_write_column_chunk call for this row group (or already be a whole column from an earlier parquet_write_column call) before parquet_finish_row_group. Error stops if a row group is already open (i.e. called again without an intervening parquet_finish_row_group) rather than silently abandoning the still-open one.

parquet_new_table parquet_tables Interface
parquet_open_reader parquet_core Interface

Opens filename for reading into reader. use_threads (optional): use Arrow's multi-threaded reader. filter (optional): a parquet_filter row filter to apply. sample_fraction (optional, real(real64)): keeps each row independently with probability sample_fraction (Bernoulli sampling, not an exact row count) -- omitted, or >= 1.0, reads every row (the current/default behavior); must not be negative or NaN (error stops); exactly 0.0 deterministically yields zero rows. Shares its underlying mask with filter= (see "Row filtering with parquet_filter" in doc/pages/io/filter-sort-sample.md): a filter, if also given, is applied on top of the downsample, and sample_fraction < 1.0 alone (even with no filter=) carries the same consequences filter= already has -- chunked reads (parquet_read_column_chunk) are disallowed, and array row/element-mode reads fall back to a whole-column read. sample_seed (optional, integer(int32)): omitted or <= 0 draws a fresh seed from entropy (a different sample each call); > 0 makes the draw reproducible. The seed actually used (caller-supplied or entropy-drawn) is always reported by parquet_close_reader(..., print_stat=.true.), so a non-deterministic run's seed can be read back afterward and reused. schema (optional): a parquet_schema/qc-maml to validate columns against. qc (optional): enable qc: min/max/miss enforcement (needs schema). qc_soft (optional): qc violations warn instead of error-stopping. prefetch (optional, default .false.): when .true., every column in the file is read and cached right away, after any filter/sample has been applied, instead of each column being read lazily on first request -- equivalent to calling parquet_prefetch_columns for every column immediately after opening; materializes the whole file in memory up front, see doc/pages/operating/performance.md.

Read more…
parquet_open_table parquet_tables Interface

Opens a file-backed table, over the whole file or over one contiguous row slice.

Read more…
parquet_open_writer parquet_core Interface
parquet_output_is_suppressed parquet_settings_base Function

Whether SOLICITED output -- something the caller explicitly asked to be printed, such as %print_stat or parquet_string_column%print -- should stay quiet. Distinct from the emit channels, which govern the library's own unsolicited messages.

parquet_parse_maml parquet_core Interface

Parses a MAML into a parquet_schema (its %maml, %cinfo and %metadata). The file form takes a filename (.maml file path) and loads it from disk first; the object form takes only schema, whose %maml has already been populated (e.g. built in memory). Both forms fill in schema's %cinfo and %metadata in place.

parquet_parse_sort_key parquet_core Interface
parquet_prefetch_columns parquet_core Interface

Reads and caches the named column(s) of an open parquet_reader (reader) right away rather than lazily on first request. parquet_prefetch_columns accepts names as either an array of column names (each element sharing one declared length -- pad shorter names with blanks) or a single scalar string listing the names separated by commas and/or semicolons ("ra;dec,mag"). The scalar form avoids the fixed-length array pitfall where a too-short declared length silently truncates a name.

parquet_print_settings parquet_settings Subroutine

Writes every setting's current value, and every read-only limit, to unit.

Read more…
parquet_push_settings_to_cpp parquet_settings Subroutine

Mirrors both output settings to the C++ side, which prints three warnings and one report of its own and cannot see Fortran module variables.

Read more…
parquet_read_array_element_mode parquet_core Interface

Reads one element position of a vector (array) column named name from an open parquet_reader (reader) across all rows: values receives that element (selected by the 1-based elem_index) from every row. Dispatched by values' actual/declared type/kind. null_value (optional) fills missing entries; is_valid (optional) reports which rows were actually present. See parquet_read_array_row_mode for the complementary "one row" access pattern. Unlike parquet_read_array_row_mode (which only needs one row group), this access pattern inherently touches every row, so every row group contributes -- none can be skipped. Instead, unless a row filter is active, this streams the file row group by row group (never materializing the whole column's flattened element count in a single internal call), so a vector column whose total element count (rows times per-row width) would otherwise exceed 2,147,483,647 can still be read this way. If a row filter is active (parquet_open_reader(..., filter=)/parquet_reader_set_filter), the whole (filtered) column is read instead, for the same reason parquet_read_array_row_mode falls back: elem_index then addresses the filtered result.

parquet_read_array_row_mode parquet_core Interface

Reads one row of a vector (array) column named name from an open parquet_reader (reader): values receives that row's full element vector, selected by the 1-based row_index. Dispatched by values' actual/declared type/kind, and separately by row_index's own kind (integer(int32) or integer(int64) -- the latter needed only to address a row beyond huge(1_int32), 2,147,483,647, in a file that large). null_value (optional) fills missing entries; is_valid (optional) reports which elements were actually present. See parquet_read_array_element_mode for the complementary "one element across all rows" access pattern. Reads only the one row group row_index falls in (not the whole column), unless a row filter is active (parquet_open_reader(..., filter=)/ parquet_reader_set_filter), in which case row_index addresses the filtered result and the whole (filtered) column is read -- mapping a filtered row index back to its physical row group needs a per-row-group survivor count that this path does not yet use.

parquet_read_column parquet_core Interface

Reads one column, named name, from an open parquet_reader (reader) into values, dispatched by its actual/declared type/kind and rank (scalar 1-D values(:), one value per row -- the column_1d specifics; or a full 2-D values(:,:), (element, row) values -- the array_full specifics, for a vector column). null_value (optional) fills missing entries; is_valid (optional) reports which elements were actually present (same rank as values).

Read more…
parquet_read_column_chunk parquet_core Interface

Reads one row group's worth of one column, named name, from an open parquet_reader (reader) into values -- the row-group-chunked counterpart to parquet_read_column, for a large column you read one row group at a time instead of materializing the whole column. row_group (1-based) selects which row group; reads are stateless/random-access (unlike the write side's parquet_new_row_group/parquet_finish_row_group pairing, there is no "currently open" row group to track -- call with any row_group, in any order, as many times as you like). Use parquet_get_num_row_groups to learn how many row groups a file has, and parquet_get_chunk_size(reader, ..., row_group=) to learn a specific row group's own row count before allocating values. Dispatched by values' actual/declared type/kind and rank (scalar values(:) or vector values(:,:)) exactly like parquet_read_column, and separately by row_group's own kind (integer(int32) or integer(int64) -- the latter needed only to address a row group beyond huge(1_int32) in a file that large). null_value (optional) fills missing entries; is_valid (optional) reports which elements were actually present.

Read more…
parquet_reader_adopt_transform parquet_core Interface
parquet_reader_set_filter parquet_core Interface

Applies a filter to an already-open reader (see the specifics' own doc-comments for the full contract). Two forms: whole-file, and scoped to an inclusive 1-based row-group range.

Read more…
parquet_reader_set_sort parquet_core Interface
parquet_release_column parquet_core Interface
parquet_reset_settings parquet_settings Subroutine

Restores every setting to the value it had before this program changed it.

Read more…
parquet_resolve_writer_compression parquet_settings Subroutine

Resolves a writer's codec and compression level from the caller's optional arguments and the process-global defaults. Library-internal plumbing -- the facade keeps it out of the use parquet namespace.

Read more…
parquet_schema parquet_core Interface

Overrides the default structure constructor so a schema can be built in one expression (my_maml = parquet_schema(table="my_table")) as an alternative to call my_maml%init(table="my_table"); both call parquet_schema_new/schema_init under the hood. table is the only required argument (the MAML table: key); survey, dataset, version, date, author, description, license, and maml_version are all optional and set the correspondingly-named MAML header key when given. Returns the newly initialized schema.

parquet_set_arrow_threads parquet_settings Subroutine

Resizes Arrow's global CPU thread pool -- the single pool shared by every parquet_reader/parquet_writer in this process that has use_threads enabled (the default). This is NOT a per-reader/per-writer setting: call it once, e.g. near the start of your program, before opening readers/writers on other threads -- calling it concurrently from multiple threads with different values is a race, since it resizes a pool everyone else is also using at that moment.

Read more…
parquet_set_default_compression parquet_settings Subroutine

Sets the compression codec parquet_open_writer uses when the caller passes no compression=. One of "uncompressed", "snappy", "gzip", "zstd", "brotli", "lz4" (case-insensitive); anything else aborts, using the same list the writer's own argument is checked against.

Read more…
parquet_set_default_compression_level parquet_settings Subroutine

Sets the compression level parquet_open_writer uses when the caller passes no compression_level=. Captured at writer open.

Read more…
parquet_set_default_use_threads parquet_settings Subroutine

Sets the default for parquet_open_writer/parquet_open_reader's use_threads=, i.e. whether Arrow's own internal thread pool is used for a reader's or writer's column work. Captured at open; an explicit use_threads= still wins.

parquet_set_file_date parquet_settings Subroutine

Pins the DATE file-metadata key to a fixed value, so that writing the same data twice produces BYTE-IDENTICAL files. Blank (the factory default) restores reading the clock.

Read more…
parquet_set_message_stream parquet_settings_base Subroutine

Sets which stream the library's own messages go to: "stdout" (the factory default) or "stderr". Case-insensitive; anything else aborts.

Read more…
parquet_set_prefetch_threads parquet_settings Subroutine

Sets the cap on how many threads parquet_table%prefetch/%materialize_all may use to read several columns at once, each on its own reader.

Read more…
parquet_set_random_parallel_min_elements parquet_settings_base Interface

Sets the work floor, in elements per thread, below which a bulk permutation stays serial. See parquet_set_random_parallel_min_elements_int64 for the full description.

parquet_set_random_threads parquet_settings_base Subroutine

Sets the cap on how many threads one bulk pf_random_permutation/pf_random_subset call may use internally.

Read more…
parquet_set_sort_counting_bucket_limit parquet_settings_base Interface

Sets the largest key value range the sort's counting fast path will accept. See parquet_set_sort_counting_bucket_limit_int64 for the full description.

parquet_set_sort_counting_path parquet_settings_base Subroutine

Sets the row count below which a sort refuses to use threads at all, however many threads= asks for. Pass 0 to restore the built-in 8192.

Read more…
parquet_set_sort_radix_path parquet_settings_base Subroutine

Enables or disables the sort's single-key radix fast path.

Read more…
parquet_set_sort_threads parquet_settings_base Subroutine

Sets the default thread count for every sort that does not pass threads= explicitly -- pf_sort/pf_argsort and friends, a read-time parquet_open_reader(..., sort_by=), and parquet_table%sort_by, which all share one engine and must share one default.

Read more…
parquet_set_statistics_prescreen parquet_settings Subroutine

Enables or disables the reader's row-group statistics screen.

Read more…
parquet_set_string_threads parquet_settings_base Subroutine

Sets the cap on how many threads one parquet_string_column bulk operation may use -- a reindex, gather, compaction or materialization of a single column's packed payload.

Read more…
parquet_set_table_threads parquet_settings Subroutine

Sets the cap on how many threads a parquet_table's row-structural mutation may use to rewrite its columns concurrently -- %sort_by, %filter_rows, %top_n, and %delete_rows and %truncate, which go through the same loop.

Read more…
parquet_set_target_row_group_bytes parquet_settings Interface

Sets the largest key value range the sort's counting fast path will accept. See parquet_set_sort_counting_bucket_limit_int64 for the full description. Sets the work floor, in elements per thread, below which a bulk permutation stays serial. See parquet_set_random_parallel_min_elements_int64 for the full description. Sets the byte size an auto-sized row group aims for. See parquet_set_target_row_group_bytes_int64 for the full description.

parquet_set_threads parquet_settings Subroutine

Sets all six thread counts at once: Arrow's pool and the five per-area caps -- sorting, the table prefetch, the table mutation, one string column's bulk work and the bulk random draws.

Read more…
parquet_set_verbosity parquet_settings_base Subroutine

Sets how much the library prints. One of "normal" (everything, the factory default), "silent" (the library's own remarks and its explicitly-called print procedures go quiet; warnings and errors still appear) or "errors_only" (warnings go quiet too). Case-insensitive; anything else aborts.

Read more…
parquet_settings_from_env parquet_settings Subroutine

Applies every PARQUET_FORTRAN_* environment variable that is set, through the knob's own setter.

Read more…
parquet_slice_list parquet_tables Interface

Builds a slice from an explicit list of 1-based row indices, in the order given -- repeats and non-monotone order are both allowed, since this is a gather, not a range.

parquet_slice_range parquet_tables Interface

Builds a start:stop:step slice. stop defaults to the table's last row (resolved when the slice is USED, not when it is built, so one slice object can outlive a row count), step to 1. A negative step counts down; a zero step is an error.

parquet_split_name_list parquet_core Subroutine

Splits a scalar string of column names into the packed array every name-taking array form expects. Separators are commas and semicolons, interchangeably; each token is trimmed of surrounding blanks, and an empty token is dropped rather than being an error (so "a,,b" is two names and "" is none).

Read more…
parquet_string_column_append_column parquet_strings Subroutine

Appends all elements (payload and nulls) from another column. Bulk-copies the payload and offsets; never re-trims. other is left unchanged.

parquet_string_column_append_from parquet_strings Interface

Typed form of %append_from, generic over an int32 or int64 index/count argument.

parquet_string_column_append_null parquet_strings Subroutine

Appends a null element to the end of the column (a zero-width, invalid slot).

parquet_string_column_append_nulls parquet_strings Interface

Typed form of %append_nulls, generic over an int32 or int64 index/count argument.

parquet_string_column_append_values parquet_strings Subroutine

Bulk-appends a character array, trimming each element's trailing blanks -- the appending counterpart of build_from's character form, sharing its packing walk and existing for the same reason: parquet_column%append_values on a string column used one %append_string call per element. See build_from_character for why the byte-view copy is what makes this fast and why len_trim must stay on the element view.

Read more…
parquet_string_column_capacity parquet_strings Function

Returns the current row capacity.

parquet_string_column_character_capacity parquet_strings Function

Returns the current character-buffer capacity in bytes.

parquet_string_column_character_size parquet_strings Function

Returns the total number of characters stored across all elements.

parquet_string_column_clear parquet_strings Subroutine

Resets the column to an empty state and releases all owned memory (capacity becomes 0). Invalidates every outstanding handle into this column.

parquet_string_column_copy_to parquet_strings Interface

Typed form of %copy_to, generic over an int32 or int64 index/count argument.

parquet_string_column_delete_by_mask parquet_strings Subroutine

Keeps only the elements whose keep entry is .true., in order, compacting payload, offsets and validity in one O(nchars) in-place pass. keep must have exactly size() entries. Dropping every element leaves a valid empty column. Invalidates every outstanding handle into the column. Note this is the bulk counterpart of erase: deleting m elements one at a time costs O(m*nchars), this costs O(nchars) once.

parquet_string_column_gather parquet_strings Interface

Typed form of %gather, generic over an int32 or int64 index/count argument.

parquet_string_column_get parquet_strings Interface

Typed form of %get, generic over an int32 or int64 index/count argument.

parquet_string_column_has_validity parquet_strings Function

Whether the validity bitmap has been materialized yet.

Read more…
parquet_string_column_is_null parquet_strings Interface

Typed form of %is_null, generic over an int32 or int64 index/count argument.

parquet_string_column_null_count parquet_strings Function

Returns the number of null elements.

parquet_string_column_reindex parquet_strings Interface

Typed form of %reindex, generic over an int32 or int64 index/count argument.

parquet_string_column_reindex_trusted parquet_strings Interface

Typed form of %reindex_trusted, generic over an int32 or int64 index/count argument.

parquet_string_column_reserve parquet_strings Interface

Typed form of %reserve, generic over an int32 or int64 index/count argument.

parquet_string_column_reserve_validity parquet_strings Subroutine

Materializes the validity bitmap now, with every element still valid.

Read more…
parquet_string_column_set parquet_strings Interface

Typed form of %set, generic over an int32 or int64 index/count argument.

parquet_string_column_set_null parquet_strings Interface

Typed form of %set_null, generic over an int32 or int64 index/count argument.

parquet_string_column_shrink_to_fit parquet_strings Subroutine

Reallocates the buffers down to exactly the current size (frees unused capacity). Invalidates every outstanding handle into this column.

parquet_string_column_size parquet_strings Function

Returns the number of elements stored.

parquet_string_threads parquet_strings Function

How many threads one parquet_string_column bulk operation would use here, right now.

Read more…
parquet_table_row_group_bounds parquet_tables Interface
parquet_time parquet_temporal Interface

Constructs a valid parquet_time from (hour, minute, second[, nanosecond]); aborts on invalid fields.

parquet_timestamp parquet_temporal Interface

Constructs a valid parquet_timestamp, either from full civil fields (year, month, day, hour, minute, second[, nanosecond]) -- aborting on invalid fields -- or from a (parquet_date, parquet_time) pair, where a null input propagates to a null result.

parquet_validate_maml parquet_core Interface

Runs the full set of MAML validity checks (a table: key, at least one field, a valid data_type on every field, ...) against either an already-loaded MAML passed as maml (a parquet_maml_file, e.g. via parquet_load_maml_file or built in memory) or a MAML filename passed as maml (a character(len=*) .maml file path, loaded from disk first, then checked identically).

parquet_validate_user_maml parquet_core Interface
parquet_write_chunk_row_mask parquet_core Interface

Sets the row filter ("mask") for the currently-open row group only, for a writer using exclusively parquet_write_column_chunk (no parquet_write_column calls anywhere in its lifetime). Must be called once per row group, after that row group's parquet_new_row_group and before its first parquet_write_column_chunk call; size(mask) must equal that row group's own nrows (from parquet_new_row_group) exactly, and the row group's actual written row count is count(mask). A second call for the same still-open row group is an error stop rather than silently replacing the first mask.

Read more…
parquet_write_column parquet_core Interface

Writes one column's values to an open parquet_writer (writer), under the given column name (name), dispatched by the actual/declared type/kind of values (scalar values(:), one value per row; or matrix/vector values(:,:), (element, row) values). is_valid (optional) marks per-element nulls (matching values' rank); a .false. entry for a protected column (see parquet_column_type%is_protected) error stops.

Read more…
parquet_write_column_chunk parquet_core Interface

Writes one column's values for the currently-open row group (see parquet_new_row_group) to an open parquet_writer (writer), under the given column name (name) -- the streaming counterpart to parquet_write_column, for a large column you build and write one row group at a time instead of as one complete array. Dispatched by the actual/declared type/kind of values, same as parquet_write_column (scalar values(:) or matrix/vector values(:,:)), and every column's chunk for the currently-open row group must have exactly parquet_new_row_group's own nrows rows. A schema-enforced column's values are converted to its declared data_type exactly as parquet_write_column converts them (int32/int64/float32/ float64 in any combination; a float-to-integer conversion error stops on a non-integral or out-of-range value, per chunk), so the same values are accepted whichever path writes them -- see parquet_append_as_schema_chunk_int32. A kind the declared type is not compatible with at all (a logical chunk into an int32 column, say) is still an error stop. A column written once via parquet_write_column can never also be written via parquet_write_column_chunk (or vice versa), and every column must appear in the first row group written for this writer, since a Parquet file's schema is fixed from that point on.

Read more…
parquet_write_row_mask parquet_core Interface

Sets a whole-file row filter ("mask") on writer: mask(i) = .false. drops row i entirely from every column written from this point on (no trace at all -- no offset, no validity bit; this is not the same as writing a Null). Must be called after parquet_open_writer and before the writer's first parquet_write_column or parquet_new_row_group call, whichever comes first.

Read more…
parquet_write_table parquet_tables Interface
pf_argminmax parquet_sorting Interface

WHERE the smallest and largest value of values are: imin/imax are 1-based indices into values, skipping nulls and NaNs.

Read more…
pf_argsort parquet_argsort Interface

The permutation that would sort values: perm(k) is the index of the element that belongs at position k. values is never modified.

Read more…
pf_argsort parquet_sorting Interface

Extends parquet_argsort's pf_argsort with the element types that need a parquet column, a packed string store or a temporal element, and with the multi-key form.

pf_equal_range parquet_sorting Interface

The INCLUSIVE range first .. last of elements equal to target, from one pass.

Read more…
pf_is_sorted parquet_sorting Interface

Whether values is already in the stated order. O(n) with an early exit, and no copy.

Read more…
pf_lower_bound parquet_sorting Interface

The first position at which target could be inserted into an already-sorted values without breaking its order -- i.e. the first element not ordered BEFORE it.

Read more…
pf_merge parquet_sorting Interface

Merges two ALREADY-SORTED arrays into one sorted array, in O(size(a) + size(b)) rather than the O(n log n) of sorting their concatenation.

Read more…
pf_minmax parquet_sorting Interface

The smallest and largest value in values, skipping nulls and NaNs.

Read more…
pf_nth_element parquet_sorting Interface

The element a full sort would place at 1-based rank nth, without sorting -- O(n) rather than O(n log n). index optionally reports which element of values that was.

Read more…
pf_nth_quantile parquet_sorting Interface

The value at quantile (on a 0-1 scale, not 0-100) of the NON-NULL values. index optionally reports which element that was; n_null how many were excluded.

Read more…
pf_partial_argsort parquet_sorting Interface

The permutation that would sort the FIRST n elements of values, without ordering the rest. perm comes back with exactly n entries (fewer if the array is shorter).

Read more…
pf_partial_sort parquet_sorting Interface

The first n elements of values in order, as an independent copy of length n. Same clamping rule as pf_partial_argsort. Never modifies its input.

Read more…
pf_permute parquet_sorting Interface

Applies perm to values IN PLACE: afterwards element k is what was at perm(k). perm itself is not modified.

Read more…
pf_random32_at parquet_random Interface

One uniform real32 in [0, 1): value draw (default 1) of stream i under seed.

Read more…
pf_random_at parquet_random Interface

One uniform real64 in [0, 1): value draw (default 1) of stream i under seed.

Read more…
pf_random_bits_at parquet_random Interface

64 raw bits: value draw (default 1) of stream i under seed, as integer(int64).

Read more…
pf_random_exp_at parquet_random Interface

One Exp(1) draw: value draw (default 1) of stream i under seed.

Read more…
pf_random_exp_portable_at parquet_random Interface

pf_random_exp_at's value computed through a frozen logarithm: identical on every platform, compiler and flag set, not merely for a given libm.

Read more…
pf_random_fill_draws parquet_random Interface

Fills v with consecutive values of one stream, starting at draw (default 1).

Read more…
pf_random_fill_exp parquet_random Interface

Fills v with consecutive Exp(1) draws of one stream, starting at draw (default 1).

Read more…
pf_random_fill_exp_portable parquet_random Interface

pf_random_fill_exp through the frozen logarithm; element k is exactly pf_random_exp_portable_at(seed, i, draw+k-1).

Read more…
pf_random_fill_normal parquet_random Interface

Fills v with consecutive standard normal draws of one stream, starting at draw.

Read more…
pf_random_fill_normal_portable parquet_random Interface

pf_random_fill_normal through the polar method and the frozen logarithm; element k is exactly pf_random_normal_portable_at(seed, i, draw+k-1).

Read more…
pf_random_fill_streams parquet_random Interface

Fills v with ONE draw of each of size(v) consecutive streams, starting at stream i0.

Read more…
pf_random_int_at parquet_random Interface

A uniform integer in [lo, hi], exactly unbiased: value draw (default 1) of stream i.

Read more…
pf_random_key parquet_random Interface

Derives an independent seed from a seed and a label, so one seed can fan out into families.

Read more…
pf_random_normal_at parquet_random Interface

One standard normal draw: value draw (default 1) of stream i under seed.

Read more…
pf_random_normal_portable_at parquet_random Interface

A standard normal that is identical on every platform, compiler and flag set, not merely for a given libm.

Read more…
pf_random_perm_at parquet_sampling Interface

Element k of a uniform-looking permutation of 1 .. m, addressed by its coordinates.

Read more…
pf_random_permutation parquet_sampling Interface

Fills perm with the whole permutation of 1 .. size(perm) under seed.

Read more…
pf_random_resample parquet_sampling Interface

Fills idx with size(idx) values drawn from 1 .. m with replacement.

Read more…
pf_random_seed parquet_random Function

A fresh, nondeterministic seed, in [1, huge(int64)].

Read more…
pf_random_subset parquet_sampling Interface

Fills idx with the first size(idx) elements of the permutation of 1 .. m under seed.

Read more…
pf_rank parquet_sorting Interface

The rank of every element of values, without reordering it. ranks(i) is the rank of values(i), so this is a per-element answer rather than a permutation.

Read more…
pf_sort parquet_sorting Interface

An independent sorted copy of values, leaving values untouched.

Read more…
pf_sort_threads parquet_argsort Interface
pf_unique parquet_sorting Interface

The distinct non-null values of values, in order, as an independent copy.

Read more…
pf_unique_count parquet_sorting Interface

How many DISTINCT non-null values values holds. n_null optionally reports how many were null.

Read more…
pf_upper_bound parquet_sorting Interface

The first position at which target is ordered BEFORE the element there -- i.e. one past the last element equal to the target.

Read more…
pf_weighted_permutation parquet_sampling Interface

Fills perm with a weighted random permutation of 1 .. size(weights).

Read more…
pf_weighted_subset parquet_sampling Interface

Fills idx with the first size(idx) items of a weighted sequential draw over weights.

Read more…
resolve_thread_count parquet_argsort Interface
runs_to_offsets parquet_argsort Interface
sort_build_permutation parquet_argsort Interface
sort_build_permutation_threaded parquet_argsort Interface
sort_build_runs_permutation parquet_argsort Interface
sort_compare_key parquet_argsort Interface
sort_comparison_permutation parquet_argsort Interface
sort_counting_candidate parquet_argsort Interface
sort_counting_permutation parquet_argsort Interface
sort_is_sorted parquet_argsort Interface
sort_keys_compare parquet_argsort Interface
sort_merge_permutation parquet_argsort Interface
sort_nth_index parquet_argsort Interface
sort_partial_permutation parquet_argsort Interface
sort_row_less parquet_argsort Interface
sort_search_position parquet_argsort Interface
sort_tier_of parquet_argsort Interface
tail_team parquet_argsort Interface
token_list parquet_settings_base Subroutine

Renders a token vocabulary as "a, b, c", for an error message.

valid_from_mask parquet_argsort Interface