jonvex commented on code in PR #8875:
URL: https://github.com/apache/hudi/pull/8875#discussion_r1218198761
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hudi/ProvidesHoodieConfig.scala:
##########
@@ -89,6 +89,62 @@ trait ProvidesHoodieConfig extends Logging {
defaultOpts = defaultOpts, overridingOpts = overridingOpts)
}
+ /**
+ * Get the insert operation.
+ * See if we are able to set bulk insert, else use deduceOperation
+ */
+ private def getOperation(isPartitionedTable: Boolean,
+ isOverwritePartition: Boolean,
+ isOverwriteTable: Boolean,
+ insertModeSet: Boolean,
+ dropDuplicate: Option[String],
+ enableBulkInsert: Option[String],
+ isInsertInto: Boolean,
+ isNonStrictMode: Boolean,
+ hasPrecombineColumn: Boolean): String = {
+ val notSetToNonStrict = !insertModeSet || isNonStrictMode
+ //if options are not set, we assume they are configs to do bulk insert
+ (isInsertInto, notSetToNonStrict, enableBulkInsert.getOrElse("true"),
Review Comment:
buildHoodieInsertConfig is called twice in HoodieCatalog as well as
HoodieInternalV2Table. They don't seem to be exclusive to insert into. If they
are not a problem, then we can get rid of the argument
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]