Account for empty partitions while closing the PTFOperator