File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
sql/core/src/main/scala/org/apache/spark/sql/execution/command Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ import org.apache.hadoop.mapred.{FileInputFormat, JobConf}
2929
3030import org .apache .spark .sql .{AnalysisException , Row , SparkSession }
3131import org .apache .spark .sql .catalyst .TableIdentifier
32- import org .apache .spark .sql .catalyst .analysis .{NoSuchTableException , Resolver }
32+ import org .apache .spark .sql .catalyst .analysis .{EliminateBarriers , NoSuchTableException , Resolver }
3333import org .apache .spark .sql .catalyst .catalog ._
3434import org .apache .spark .sql .catalyst .catalog .CatalogTypes .TablePartitionSpec
3535import org .apache .spark .sql .catalyst .expressions .{Attribute , AttributeReference }
@@ -891,8 +891,9 @@ object DDLUtils {
891891 * Throws exception if outputPath tries to overwrite inputpath.
892892 */
893893 def verifyNotReadPath (query : LogicalPlan , outputPath : Path ) : Unit = {
894- val inputPaths = query.collect {
895- case LogicalRelation (r : HadoopFsRelation , _, _, _) => r.location.rootPaths
894+ val inputPaths = EliminateBarriers (query).collect {
895+ case LogicalRelation (r : HadoopFsRelation , _, _, _) =>
896+ r.location.rootPaths
896897 }.flatten
897898
898899 if (inputPaths.contains(outputPath)) {
You can’t perform that action at this time.
0 commit comments