boneanxs commented on code in PR #8452: URL: https://github.com/apache/hudi/pull/8452#discussion_r1191973525
########## hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/SparkHoodieTableFileIndex.scala: ########## @@ -307,8 +318,20 @@ class SparkHoodieTableFileIndex(spark: SparkSession, Seq(new PartitionPath(relativePartitionPathPrefix, staticPartitionColumnNameValuePairs.map(_._2._2.asInstanceOf[AnyRef]).toArray)) } else { // Otherwise, compile extracted partition values (from query predicates) into a sub-path which is a prefix - // of the complete partition path, do listing for this prefix-path only - listPartitionPaths(Seq(relativePartitionPathPrefix).toList.asJava).asScala + // of the complete partition path, do listing for this prefix-path and filter them with partitionPredicates + Try { + SparkFilterHelper.convertDataType(partitionSchema).asInstanceOf[RecordType] + } match { + case Success(partitionRecordType) if partitionRecordType.fields().size() == _partitionSchemaFromProperties.size => + val convertedFilters = SparkFilterHelper.convertFilters( + partitionColumnPredicates.flatMap { + expr => sparkAdapter.translateFilter(expr) + }) + listPartitionPaths(Seq(relativePartitionPathPrefix).toList.asJava, partitionRecordType, convertedFilters).asScala Review Comment: Make sense, will add check here -- 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-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org