[SPARK-3781] code Style format

I think the `()` should be there because this is not just a getter (it also increments)