These helper classes need to be marked `private[spark]`