[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
We can replace `writerMap.get(...) match { case None ... }` structure here with `writerMap.getOrElse(..., { ... })`.