You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "danny0405 (via GitHub)" <gi...@apache.org> on 2023/05/11 08:05:12 UTC

[GitHub] [hudi] danny0405 commented on a diff in pull request #8687: [HUDI-6202] Validate that hiveStylePartitioningEnable is present in t…

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


##########
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:
   Can you explain why it could not hold a default value? Can you check how it is initialized when table is initialized from scratch? Can you also add a test case if necessary.



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