nsivabalan commented on code in PR #18205:
URL: https://github.com/apache/hudi/pull/18205#discussion_r2829868789
##########
hudi-spark-datasource/hudi-spark-common/src/test/scala/org/apache/hudi/TestDataSourceOptions.scala:
##########
@@ -43,4 +43,24 @@ class TestDataSourceOptions {
HoodieTableConfig.DROP_PARTITION_COLUMNS.defaultValue(),
DataSourceWriteOptions.DROP_PARTITION_COLUMNS.defaultValue())
}
+
+ @Test
+ def testReadDefaultsSupportSparkHoodieConfigs(): Unit = {
+ val params = DataSourceOptionsHelper.parametersWithReadDefaults(Map(
+ "spark.hoodie.datasource.query.type" ->
DataSourceReadOptions.QUERY_TYPE_INCREMENTAL_OPT_VAL
+ ))
+
+ assertEquals(DataSourceReadOptions.QUERY_TYPE_INCREMENTAL_OPT_VAL,
params(DataSourceReadOptions.QUERY_TYPE.key))
+ assertTrue(!params.contains("spark.hoodie.datasource.query.type"))
+ }
+
+ @Test
+ def testReadDefaultsPreferHoodieOverSparkHoodieWhenBothSet(): Unit = {
+ val params = DataSourceOptionsHelper.parametersWithReadDefaults(Map(
Review Comment:
can we also add a test w/ global DFS props and validate the hierarchy
matches our expectation
--
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]