[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
Wrong indentation (should be 2 spaces).

And more important, `dynamicPartPath` is defined out of the closure, but the assignment here is executed on the executor side.