Start of porting changes from parquet-file-writer into this API