Github user kunal642 commented on the issue:
https://github.com/apache/carbondata/pull/2667
@xuchuanyin Actually i was never able to find why this stackoverflow
exception is thrown but while debugging i realised that a lot of recursive call
is occurring when trying to serialize 'PartitionSpec'. After a little bit of
searching i found a article which suggested that collections are serialized in
a recursive manner. I tried this solution as i wasn't getting any other clue. ---
