danny0405 commented on code in PR #8755:
URL: https://github.com/apache/hudi/pull/8755#discussion_r1198544786
##########
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/procedures/StatsFileSizeProcedure.scala:
##########
@@ -54,8 +55,22 @@ class StatsFileSizeProcedure extends BaseProcedure with
ProcedureBuilder {
val globRegex = getArgValueOrDefault(args,
parameters(1)).get.asInstanceOf[String]
val limit: Int = getArgValueOrDefault(args,
parameters(2)).get.asInstanceOf[Int]
val basePath = getBasePath(table)
- val fs =
HoodieTableMetaClient.builder.setConf(jsc.hadoopConfiguration()).setBasePath(basePath).build.getFs
- val globPath = String.format("%s/%s/*", basePath, globRegex)
+ val metaClient =
HoodieTableMetaClient.builder.setConf(jsc.hadoopConfiguration()).setBasePath(basePath).build
+ val fs = metaClient.getFs
+ val isTablePartitioned = metaClient.getTableConfig.isTablePartitioned
+ val maximumPartitionDepth = if (isTablePartitioned)
metaClient.getTableConfig.getPartitionFields.get.length else 0
+ val globPath = (metaClient.getTableConfig.isTablePartitioned, globRegex)
match {
Review Comment:
```suggestion
val globPath = (isTablePartitioned, globRegex) match {
```
--
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]