Revert https://github.com/apache/spark/pull/2872

Manual revert of d12c0711faa3d4333513fcbbbee4868bcb784a26