yihua commented on code in PR #12929:
URL: https://github.com/apache/hudi/pull/12929#discussion_r1988053182
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hudi/ProvidesHoodieConfig.scala:
##########
@@ -556,4 +533,35 @@ object ProvidesHoodieConfig {
private def filterNullValues(opts: Map[String, String]): Map[String, String]
=
opts.filter { case (_, v) => v != null }
+ private def buildOverridingOpts(hoodieCatalogTable: HoodieCatalogTable,
+ preCombineField: String): Map[String,
String] = {
+ buildCommonOverridingOpts(hoodieCatalogTable) ++ Map(
+ PRECOMBINE_FIELD.key -> preCombineField
+ )
+ }
+
+ private def buildOverridingOptsForDelete(hoodieCatalogTable:
HoodieCatalogTable): Map[String, String] = {
+ buildCommonOverridingOpts(hoodieCatalogTable) ++ Map(
+ OPERATION.key -> DataSourceWriteOptions.DELETE_OPERATION_OPT_VAL
+ )
+ }
+
+ private def buildCommonOverridingOpts(hoodieCatalogTable:
HoodieCatalogTable): Map[String, String] = {
+ val tableConfig = hoodieCatalogTable.tableConfig
+ val baseOpts = Map(
+ "path" -> hoodieCatalogTable.tableLocation,
+ TABLE_NAME.key -> tableConfig.getTableName,
Review Comment:
```suggestion
TBL_NAME.key -> tableConfig.getTableName,
```
--
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]