You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "nsivabalan (via GitHub)" <gi...@apache.org> on 2023/04/18 02:02:11 UTC
[GitHub] [hudi] nsivabalan commented on a diff in pull request #8402: [HUDI-6048] Check if partition exists before list partition by path prefix
nsivabalan commented on code in PR #8402:
URL: https://github.com/apache/hudi/pull/8402#discussion_r1169413988
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/SparkHoodieTableFileIndex.scala:
##########
@@ -299,7 +299,9 @@ class SparkHoodieTableFileIndex(spark: SparkSession,
// prefix to try to reduce the scope of the required file-listing
val relativePartitionPathPrefix = composeRelativePartitionPath(staticPartitionColumnNameValuePairs)
- if (staticPartitionColumnNameValuePairs.length == partitionColumnNames.length) {
+ if (!metaClient.getFs.exists(new Path(getBasePath, relativePartitionPathPrefix))) {
Review Comment:
we should avoid fs.exists call. all direct fs calls should get routed to BaseMetadataTable interface. if metadata is enabled, we fetch the value from metadata table.
--
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