fuwhu commented on a change in pull request #27213: [SPARK-30516][SQL] 
statistic estimation of FileScan should take partitionFilters into account
URL: https://github.com/apache/spark/pull/27213#discussion_r374446244
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/InMemoryFileIndex.scala
 ##########
 @@ -56,6 +56,11 @@ class InMemoryFileIndex(
   extends PartitioningAwareFileIndex(
     sparkSession, parameters, userSpecifiedSchema, fileStatusCache) {
 
+  assert(userSpecifiedPartitionSpec.isEmpty ||
+    
userSpecifiedPartitionSpec.get.partitions.map(_.path).equals(rootPathsSpecified),
+    s"The rootPathsSpecified ($rootPathsSpecified) is inconsistent with the 
file paths " +
+      s"of userSpecifiedPartitionSpec 
(${userSpecifiedPartitionSpec.get.partitions.map(_.path)}).")
+
 
 Review comment:
   Just add an assertion incidentally here, this is not necessary for this PR.
   if not ok, i can remove it.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to