SPARK-3968: Fix scala code style