You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "flashJd (via GitHub)" <gi...@apache.org> on 2023/07/31 01:06:07 UTC
[GitHub] [hudi] flashJd commented on a diff in pull request #9113: [HUDI-6466] Fix spark insert overwrite partitioned table with dynamic partition
flashJd commented on code in PR #9113:
URL: https://github.com/apache/hudi/pull/9113#discussion_r1278656938
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hudi/ProvidesHoodieConfig.scala:
##########
@@ -300,6 +316,45 @@ trait ProvidesHoodieConfig extends Logging {
}
}
+ def deduceIsOverwriteTable(sparkSession: SparkSession,
+ catalogTable: HoodieCatalogTable,
+ partitionSpec: Map[String, Option[String]]): Boolean = {
+ val operation = sparkSession.sqlContext.getConf(OPERATION.key, "")
+ if (operation.nonEmpty && operation.equals(INSERT_OVERWRITE_TABLE_OPERATION_OPT_VAL)) {
+ true
+ } else if (operation.nonEmpty && operation.equals(INSERT_OVERWRITE_OPERATION_OPT_VAL)) {
+ false
+ } else {
Review Comment:
Thanks for the review, I'll refine the code later
--
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.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org