[SPARK-4964] code cleanup per tdas