We should perform a similar conversion in the regular Spark Java API, too.  We could do this in a separate pull request, though.