parquet_string_column_gather Interface

public interface parquet_string_column_gather

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


Module Procedures

private subroutine parquet_string_column_gather_i32(self, idx)

int32 specific of gather; see the gather generic.

Arguments

Type IntentOptional Attributes Name
type(parquet_string_column), intent(inout) :: self

the column.

integer(kind=int32), intent(in) :: idx(:)

1-based source index per destination element.

private subroutine parquet_string_column_gather_i64(self, idx)

int64 specific of gather: rebuilds the column so that element k is the element that was at idx(k), for an index list of ANY length.

This is the subset-and-reorder primitive reindex and delete_by_mask do not provide between them: reindex demands a permutation of the whole column, and delete_by_mask keeps the existing order. idx may name any element in 1..size(), in any order, and may name one more than once -- it is a gather, not a permutation, so the result may be shorter than, as long as, or longer than the column it replaces.

Only the range is checked. Refusing repeats would need a seen-set sized by the SOURCE element count on every call, which is exactly the cost this primitive exists to avoid; a caller that needs distinctness (parquet_table%top_n does) checks it once for itself.

Rebuilds into fresh buffers rather than compacting in place, because a reordering write cursor can overtake its own read cursor -- which is why delete_by_mask, whose output order is the input order, may compact in place and this may not. Two further differences from reindex_apply, both consequences of the length being free to change: the payload is sized to the SELECTED characters rather than to nchars, and n_null is recounted rather than carried over.

Arguments

Type IntentOptional Attributes Name
type(parquet_string_column), intent(inout) :: self

the column.

integer(kind=int64), intent(in) :: idx(:)

1-based source index per destination element.