[SPARK-3007][SQL]Add "Dynamic Partition" support to Spark Sql hive

the detail please refer the comment of https://issues.apache.org/jira/browse/SPARK-3007
Ah, sorry, I didn't make myself clear enough. I mean you can refer to `Cast.threadLocalDateFormat`, not add the thread-local version of `NumberFormat` here, since it's not related to `Cast`. A better place to hold this could be `object SparkHadoopWriter`.