viirya commented on a change in pull request #25763: [SPARK-29057][SQL] remove
InsertIntoTable
URL: https://github.com/apache/spark/pull/25763#discussion_r323469867
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicLogicalOperators.scala
##########
@@ -639,42 +639,6 @@ case class ShowTables(
AttributeReference("tableName", StringType, nullable = false)())
}
-/**
- * Insert some data into a table. Note that this plan is unresolved and has to
be replaced by the
- * concrete implementations during analysis.
- *
- * @param table the logical plan representing the table. In the future this
should be a
- * [[org.apache.spark.sql.catalyst.catalog.CatalogTable]] once we
converge Hive tables
- * and data source tables.
- * @param partition a map from the partition key to the partition value
(optional). If the partition
- * value is optional, dynamic partition insert will be
performed.
- * As an example, `INSERT INTO tbl PARTITION (a=1, b=2) AS
...` would have
- * Map('a' -> Some('1'), 'b' -> Some('2')),
- * and `INSERT INTO tbl PARTITION (a=1, b) AS ...`
- * would have Map('a' -> Some('1'), 'b' -> None).
- * @param query the logical plan representing data to write to.
- * @param overwrite overwrite existing table or partitions.
- * @param ifPartitionNotExists If true, only write if the partition does not
exist.
- * Only valid for static partitions.
- */
-case class InsertIntoTable(
- table: LogicalPlan,
- partition: Map[String, Option[String]],
- query: LogicalPlan,
- overwrite: Boolean,
- ifPartitionNotExists: Boolean)
- extends LogicalPlan {
- // IF NOT EXISTS is only valid in INSERT OVERWRITE
- assert(overwrite || !ifPartitionNotExists)
Review comment:
I saw these checks too in InsertIntoStatement.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]