See https://github.com/apache/spark/pull/11748#issuecomment-230760283
[Github] Pull Request #14099 (ericl)