parquet_maml_file Derived Type

type, public :: parquet_maml_file

One embedded or user-supplied MAML file: its raw source lines plus, once parsed/validated, the columns missing relative to the base schema and any col_map: renames it declares. add_col_qc/set_col_qc build a qc-maml incrementally (see parquet_maml_base_add_col_qc.f90).


Components

Type Visibility Attributes Name Initial
logical, public :: user_maml = .false.

true if this is a user defined MAML file

character(len=:), public, allocatable :: name

This MAML file name (embedded fixture name or path).

character(len=:), public, allocatable :: lines(:)

Raw MAML source, one array element per line.

type(parquet_maml_missing_column), public, allocatable :: missing_columns(:)

Columns present in the base MAML but missing from this (user) MAML; populated by parquet_validate_user_maml, consumed by parquet_read_maml.

type(parquet_maml_col_map_entry), public, allocatable :: col_map(:)

Parsed col_map: section (see parquet_maml_col_map_entry): exposes the renames this MAML declares, for inspection; populated by parquet_validate_user_maml. Renames are applied automatically whenever this MAML lines are parsed, independent of whether this is set.


Type-Bound Procedures

procedure, public :: add_col_qc => parquet_maml_add_col_qc

Appends one qc: field entry.

  • interface

    private module subroutine parquet_maml_add_col_qc(self, qc_input, col_name)

    Appends one qc: field entry to this MAML from a compact "col, min, max, miss" string. col_name (optional) returns the parsed column name. Implemented in the submodule src/parquet_maml_base_add_col_qc.f90.

    Arguments

    Type IntentOptional Attributes Name
    class(parquet_maml_file), intent(inout) :: self

    qc-maml being built; gains a fields: entry.

    character(len=*), intent(in) :: qc_input

    compact "col, min, max, miss" string.

    character(len=:), intent(out), optional, allocatable :: col_name

    parsed column name.

procedure, public :: set_col_qc => parquet_maml_set_col_qc

In-place form; parses the name into its argument.

  • interface

    private module subroutine parquet_maml_set_col_qc(self, col_name)

    In-place form of add_col_qc: appends the same qc: field entry. col_name is intent(inout): it holds the compact "col, min, max, miss" string on entry and the parsed column name on exit, so a caller reuses one variable (call maml%set_col_qc(col)) instead of naming a separate input and output.

    Arguments

    Type IntentOptional Attributes Name
    class(parquet_maml_file), intent(inout) :: self

    qc-maml being built; gains a fields: entry.

    character(len=:), intent(inout), allocatable :: col_name

    compact "col, min, max, miss" string on entry; parsed column name on exit.

Source Code

    type, public :: parquet_maml_file
        logical :: user_maml = .false. !! true if this is a user defined MAML file
        character(len=:), allocatable :: name !! This MAML file name (embedded fixture name or path).
        character(len=:), allocatable :: lines(:) !! Raw MAML source, one array element per line.
        !> Columns present in the base MAML but missing from this (user) MAML;
        !> populated by parquet_validate_user_maml, consumed by parquet_read_maml.
        type(parquet_maml_missing_column), allocatable :: missing_columns(:)
        !> Parsed col_map: section (see parquet_maml_col_map_entry): exposes the
        !> renames this MAML declares, for inspection; populated by
        !> parquet_validate_user_maml. Renames are applied automatically whenever
        !> this MAML lines are parsed, independent of whether this is set.
        type(parquet_maml_col_map_entry), allocatable :: col_map(:)
    contains
        procedure :: add_col_qc => parquet_maml_add_col_qc !! Appends one qc: field entry.
        procedure :: set_col_qc => parquet_maml_set_col_qc !! In-place form; parses the name into its argument.
    end type parquet_maml_file