Address @rxin comments on apache/spark#3054 and apache/spark#3100