Skip to content

Commit

Permalink
Attributes should be compared using exprId, not TreeNode.id.
Browse files Browse the repository at this point in the history
  • Loading branch information
marmbrus committed Mar 24, 2014
1 parent 80c2968 commit 9d99cb6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ trait HiveStrategies {
case p @ FilteredOperation(predicates, relation: MetastoreRelation)
if relation.isPartitioned =>

val partitionKeyIds = relation.partitionKeys.map(_.id).toSet
val partitionKeyIds = relation.partitionKeys.map(_.exprId).toSet

// Filter out all predicates that only deal with partition keys
val (pruningPredicates, otherPredicates) = predicates.partition {
_.references.map(_.id).subsetOf(partitionKeyIds)
_.references.map(_.exprId).subsetOf(partitionKeyIds)
}

val scan = HiveTableScan(
Expand Down

0 comments on commit 9d99cb6

Please sign in to comment.