parquet_measure_list_width Interface

public interface parquet_measure_list_width

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".

Such a column may hold a different number of elements in every row, so unlike a FIXED_SIZE_LIST (this library's own vector layout) its width is a property of the data rather than the schema -- see parquet_column_width_needs_data. width comes back as 1 when no single width above 1 covers every row, which is also the answer for a genuinely scalar column or a FIXED_SIZE_LIST of width 1, and as 0 for a column with no rows at all -- matching what parquet_get_col_size reports for an empty list column.

proven chooses how much work to do, and the difference matters:

  • .false. -- decide from the file footer alone, reading no column data at all. Per row group, the mean elements per row is compared against its neighbours; a non-integral or disagreeing mean proves no uniform width exists. A surviving answer is a CANDIDATE only: rows of length 3, 1, 3, 1 average to exactly 2. Use this when a wrong answer is safe because something downstream will reject it.
  • .true. -- screen as above, then confirm by reading the covered row groups one at a time, stopping at the first row that disagrees. Peak memory stays at one row group, so this is safe on a column far larger than memory, but it does read data.

Module Procedures

private interface parquet_measure_list_width_int32()

Arguments

None

private interface parquet_measure_list_width_int64()

Arguments

None