InsertIntoStatement¶
InsertIntoStatement is a UnaryParsedStatement.
Creating Instance¶
InsertIntoStatement takes the following to be created:
- Table (LogicalPlan)
- Partition Specification (
Map[String, Option[String]]) - User-specified column names
- Query
-
overwriteflag -
ifPartitionNotExistsflag
InsertIntoStatement is created when:
- Catalyst DSL is used to insertInto
AstBuilderis requested to withInsertInto- DataFrameWriter.insertInto operator is used
Logical Resolution¶
InsertIntoStatement is resolved to the following logical operators:
- InsertIntoDataSourceCommand (for
InsertIntoStatements over LogicalRelation over InsertableRelation) by DataSourceAnalysis - InsertIntoHadoopFsRelationCommand (for
InsertIntoStatements over LogicalRelation over HadoopFsRelation) by DataSourceAnalysis
Logical Analysis¶
InsertIntoStatements with UnresolvedCatalogRelations are resolved by the following logical analysis rules:
- FindDataSourceTable
FallBackFileSourceV2PreprocessTableInsertion- PreWriteCheck