Copying a parquet_table: %clone (an independent deep copy) and %clone_structure (an
empty table with the same columns).
%clone is the only rollback mechanism this type has. Mutation is in place, and there is
no undo log -- deliberately, since an implicit one would double the memory of every table on
the chance that someone wants to go back. The documented substitute is to copy before mutating,
which is only a real option if copying is a first-class, obvious operation. Hence this file.
Both take class(parquet_table), intent(out) :: out rather than returning an allocatable
result. Fortran resolves a type-bound procedure reference against the DECLARED type, so a
class(parquet_table), allocatable result would make out%mass() a compile error on a
generated table and force select type around every use of a clone -- defeating the point of
the generated accessors. With intent(out) the caller declares the concrete type and
everything resolves normally; intent(out) on a finalizable type also runs the finalizer and
resets every component for free, which is exactly what a clone target wants.