Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ object HoodieOptionConfig {
params.get(DataSourceWriteOptions.PRECOMBINE_FIELD.key).filter(_.nonEmpty)
}

def deleteHooideOptions(options: Map[String, String]): Map[String, String] = {
def deleteHoodieOptions(options: Map[String, String]): Map[String, String] = {
options.filterNot(_._1.startsWith("hoodie.")).filterNot(kv => keyMapping.contains(kv._1))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ case class CreateHoodieTableCommand(table: CatalogTable, ignoreIfExists: Boolean
val serdeFormat = HoodieInputFormatUtils.getSerDeClassName(HoodieFileFormat.PARQUET)

// only parameters irrelevant to hudi can be set to storage.properties
val storageProperties = HoodieOptionConfig.deleteHooideOptions(options)
val storageProperties = HoodieOptionConfig.deleteHoodieOptions(options)
val newStorage = new CatalogStorageFormat(
Some(new Path(path).toUri),
Some(inputFormat),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ class TestHoodieOptionConfig extends HoodieClientTestBase {
}

@Test
def testDeleteHooideOptions(): Unit = {
def testDeleteHoodieOptions(): Unit = {
val sqlOptions = Map("primaryKey" -> "id,addr",
"preCombineField" -> "timestamp",
"type" -> "mor",
"hoodie.index.type" -> "INMEMORY",
"hoodie.compact.inline" -> "true",
"key123" -> "value456"
)
val tableConfigs = HoodieOptionConfig.deleteHooideOptions(sqlOptions)
val tableConfigs = HoodieOptionConfig.deleteHoodieOptions(sqlOptions)
assertTrue(tableConfigs.size == 1)
assertTrue(tableConfigs("key123") == "value456")
}
Expand Down