parquet_string_column_copy_to Interface

public interface parquet_string_column_copy_to

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


Module Procedures

private subroutine parquet_string_column_copy_to_i32(self, i, dest, allow_null)

int32 specific of copy_to; see the copy_to generic.

Arguments

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

the column.

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

1-based element index.

character(len=*), intent(out) :: dest

receives the element, blank-padded.

logical, intent(in), optional :: allow_null

.true. => a null yields blanks.

private subroutine parquet_string_column_copy_to_i64(self, i, dest, allow_null)

int64 specific of copy_to: copies element i's bytes into dest, blank-padding the rest.

The allocation-free counterpart of %get, for the very common shape where the caller already has somewhere fixed-width to put the value — a character(len=N) array being filled row by row, or a scratch buffer reused across a loop. %get must allocate, because it returns a string sized to the element; this cannot and does not.

It follows Fortran's own assignment semantics exactly, so it is a drop-in for call c%get(i, s); dest = s: shorter values are blank-padded, and a value longer than dest is truncated rather than aborting — which is what dest = s would have done. A caller that must not truncate sizes dest from %length(i) or %max_length() first, both of which allocate nothing either.

Arguments

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

the column.

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

1-based element index.

character(len=*), intent(out) :: dest

receives the element, blank-padded.

logical, intent(in), optional :: allow_null

.true. => a null yields blanks.