You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/09/27 20:47:44 UTC

[GitHub] [hudi] alexeykudinkin commented on a diff in pull request #5616: [MINOR]: Optimize the judgment logic of `SparkDataSourceOptions Key`

alexeykudinkin commented on code in PR #5616:
URL: https://github.com/apache/hudi/pull/5616#discussion_r981695841


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/DataSourceOptions.scala:
##########
@@ -780,6 +780,9 @@ object DataSourceOptionsHelper {
     ) ++ translateConfigurations(parameters)
   }
 
+  def isHoodieConfigKey(key: String): Boolean =
+    key.startsWith("hoodie.") || key == DataSourceReadOptions.TIME_TRAVEL_AS_OF_INSTANT.key
+

Review Comment:
   Agree w/ you @xushiyan, but as far as i understand has already been exposed as it is (`as.of.instant`) and as such we will have to go t/h migration to change it. 
   
   I think that decision we can take separately from fixing an issue of not propagating this config.



##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/DataSourceOptions.scala:
##########
@@ -780,6 +780,9 @@ object DataSourceOptionsHelper {
     ) ++ translateConfigurations(parameters)
   }
 
+  def isHoodieConfigKey(key: String): Boolean =
+    key.startsWith("hoodie.") || key == DataSourceReadOptions.TIME_TRAVEL_AS_OF_INSTANT.key
+

Review Comment:
   @gnailJC let's actually reframe it like following (to make it more easily extensible): 
   
   val hudiConfigKeyPrefixes = Seq("hoodie.", "as.of.instant")
   
   def isHoodieConfigKey(key): = hudiConfigKeyPrefixes.exists(prefix => key.startsWith(prefix))



-- 
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