SparkPartitionPruningSinkOperator buffers everything in memory and only flushes to the output file with the operator is closed. This can cause memory issues.