-
Notifications
You must be signed in to change notification settings - Fork 28.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-41713][SQL] Make CTAS hold a nested execution for data writing
### What changes were proposed in this pull request? This pr aims to make ctas use a nested execution instead of running data writing cmmand. So, we can clean up ctas itself to remove the unnecessary v1write information. Now, the v1writes only have two implementation: `InsertIntoHadoopFsRelationCommand` and `InsertIntoHiveTable` ### Why are the changes needed? Make v1writes code clear. ```sql EXPLAIN FORMATTED CREATE TABLE t2 USING PARQUET AS SELECT * FROM t; == Physical Plan == Execute CreateDataSourceTableAsSelectCommand (1) +- CreateDataSourceTableAsSelectCommand (2) +- Project (5) +- SubqueryAlias (4) +- LogicalRelation (3) (1) Execute CreateDataSourceTableAsSelectCommand Output: [] (2) CreateDataSourceTableAsSelectCommand Arguments: `spark_catalog`.`default`.`t2`, ErrorIfExists, [c1, c2] (3) LogicalRelation Arguments: parquet, [c1#11, c2#12], `spark_catalog`.`default`.`t`, org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe, false (4) SubqueryAlias Arguments: spark_catalog.default.t (5) Project Arguments: [c1#11, c2#12] ``` ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? improve existed test Closes #39220 from ulysses-you/SPARK-41713. Authored-by: ulysses-you <ulyssesyou18@gmail.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com>
- Loading branch information
1 parent
87a235c
commit 4b40920
Showing
11 changed files
with
159 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.