wankunde opened a new pull request #28944: URL: https://github.com/apache/spark/pull/28944
### What changes were proposed in this pull request? When INSERT OVERWRITE a partitioned data source table, spark will verify input and output paths by default. Set to false to skip the verify in some cases. (eg. INSERT OVERWRITE t partition(dt=a) SELECT * FROM t WHERE dt=b) ### Why are the changes needed? Without this parameter , SQL like ` INSERT OVERWRITE t partition(dt=a) SELECT * FROM t WHERE dt=b` will throw `AnalysisException` exception. ``` Exception in thread "main" org.apache.spark.sql.AnalysisException: Cannot overwrite a path that is also being read from.; at org.apache.spark.sql.execution.command.DDLUtils$.verifyNotReadPath(ddl.scala:940) at org.apache.spark.sql.execution.datasources.DataSourceAnalysis$$anonfun$apply$1.applyOrElse(DataSourceStrategy.scala:226) at org.apache.spark.sql.execution.datasources.DataSourceAnalysis$$anonfun$apply$1.applyOrElse(DataSourceStrategy.scala:146) ``` ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Add new test case. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org