File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions
hive/src/main/scala/org/apache/spark/sql/hive Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -112,4 +112,6 @@ class AttributeSet private (val baseSet: Set[AttributeEquals])
112
112
override def toSeq : Seq [Attribute ] = baseSet.map(_.a).toArray.toSeq
113
113
114
114
override def toString = " {" + baseSet.map(_.a).mkString(" , " ) + " }"
115
+
116
+ def isEmpty : Boolean = baseSet.isEmpty
115
117
}
Original file line number Diff line number Diff line change @@ -194,10 +194,9 @@ private[hive] trait HiveStrategies {
194
194
// Filter out all predicates that only deal with partition keys, these are given to the
195
195
// hive table scan operator to be used for partition pruning.
196
196
val partitionKeyIds = AttributeSet (relation.partitionKeys)
197
- val (pruningPredicates, otherPredicates) = predicates.partition { x =>
198
- x.references.baseSet != null &&
199
- ! x.references.baseSet.isEmpty &&
200
- x.references.subsetOf(partitionKeyIds)
197
+ val (pruningPredicates, otherPredicates) = predicates.partition { predicate =>
198
+ ! predicate.references.isEmpty &&
199
+ predicate.references.subsetOf(partitionKeyIds)
201
200
}
202
201
203
202
pruneFilterProject(
You can’t perform that action at this time.
0 commit comments