Updated based on Spark internal API change.