voonhous commented on code in PR #8687:
URL: https://github.com/apache/hudi/pull/8687#discussion_r1200100478


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/SparkHoodieTableFileIndex.scala:
##########
@@ -319,6 +319,8 @@ class SparkHoodieTableFileIndex(spark: SparkSession,
    * @return relative partition path and a flag to indicate if the path is 
complete (i.e., not a prefix)
    */
   private def 
composeRelativePartitionPath(staticPartitionColumnNameValuePairs: Seq[(String, 
(String, Any))]): String = {
+    // NOTE: Do not blindly use default value if tableConfig does not have the 
hiveStylePartitioningEnable config
+    checkState(metaClient.getTableConfig.getHiveStylePartitioningEnableOrNull 
!= null)

Review Comment:
   @danny0405 in #8752, we found that some entrypoints do not have the 
HIVE_STYLE_PARTITIONING_ENABLED config written to hoodie.properties.
   
   Can we also have this PR in case there are any future entrypoints that do 
not write HIVE_STYLE_PARTITIONING?
   
   I can also add a check to fallback to eager partition pruning if the 
HIVE_STYLE_PARTITIONING_ENABLED config is not found in hoodie.properties to 
ensure data-correctness when querying.
   
   Whatever it is, i feel a validation/check/fallback here is required instead 
assuming a default value. Please let me know what your preferences is. 



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

Reply via email to