Right, that would have also been my next suggestion, at least to repartition.
The problem is that your partition got too big at 1.5b rows, compared to the amount of memory you have available for the optimize compression, so it fails. You've done the right thing by repartitioning it, now each partition can be individually managed for compression.