You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/12/07 07:51:33 UTC
[GitHub] [spark] cloud-fan commented on a change in pull request #30624: [SPARK-33676][SQL] Require exact matching of partition spec to the schema in V2 `ALTER TABLE .. ADD/DROP PARTITION`
cloud-fan commented on a change in pull request #30624:
URL: https://github.com/apache/spark/pull/30624#discussion_r537294768
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolvePartitionSpec.scala
##########
@@ -51,14 +61,16 @@ object ResolvePartitionSpec extends Rule[LogicalPlan] {
private def resolvePartitionSpecs(
tableName: String,
partSpecs: Seq[PartitionSpec],
- partSchema: StructType): Seq[ResolvedPartitionSpec] =
+ partSchema: StructType,
+ checkSpec: TablePartitionSpec => Unit = _ => ()): Seq[ResolvedPartitionSpec] =
Review comment:
Why do we make it so general as a callback function? Shall we just call `requireExactMatchedPartitionSpec` inside this method?
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolvePartitionSpec.scala
##########
@@ -51,14 +61,16 @@ object ResolvePartitionSpec extends Rule[LogicalPlan] {
private def resolvePartitionSpecs(
tableName: String,
partSpecs: Seq[PartitionSpec],
- partSchema: StructType): Seq[ResolvedPartitionSpec] =
+ partSchema: StructType,
+ checkSpec: TablePartitionSpec => Unit = _ => ()): Seq[ResolvedPartitionSpec] =
Review comment:
Why do we make it so general as a callback function? Shall we just call `requireExactMatchedPartitionSpec` inside this method?
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org