maropu commented on a change in pull request #29637:
URL: https://github.com/apache/spark/pull/29637#discussion_r482927828
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileSourceStrategy.scala
##########
@@ -154,9 +154,12 @@ object FileSourceStrategy extends Strategy with
PredicateHelper with Logging {
l.resolve(
fsRelation.partitionSchema,
fsRelation.sparkSession.sessionState.analyzer.resolver)
val partitionSet = AttributeSet(partitionColumns)
- val partitionKeyFilters =
+ val partitionKeyFilters = if (partitionColumns.isEmpty) {
+ ExpressionSet(Nil)
+ } else {
ExpressionSet(normalizedFilters
.filter(_.references.subsetOf(partitionSet)))
+ }
logInfo(s"Pruning directories with:
${partitionKeyFilters.mkString(",")}")
Review comment:
nit: Is this logging still meaningful for the non-partition case? I
mean, could we move it inside the `else` block in the line 159-162?
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]