We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e643f8 commit e572b9aCopy full SHA for e572b9a
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveStrategies.scala
@@ -194,8 +194,10 @@ private[hive] trait HiveStrategies {
194
// Filter out all predicates that only deal with partition keys, these are given to the
195
// hive table scan operator to be used for partition pruning.
196
val partitionKeyIds = AttributeSet(relation.partitionKeys)
197
- val (pruningPredicates, otherPredicates) = predicates.partition {
198
- _.references.subsetOf(partitionKeyIds)
+ val (pruningPredicates, otherPredicates) = predicates.partition { x =>
+ x.references.baseSet != null &&
199
+ !x.references.baseSet.isEmpty &&
200
+ x.references.subsetOf(partitionKeyIds)
201
}
202
203
pruneFilterProject(
0 commit comments