Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
maropu committed Dec 20, 2019
1 parent 16d99c7 commit 19a36b3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -541,12 +541,12 @@ class Analyzer(

// If necessary, removes duplicate grouping sets
val hasDuplicateGroups = selectedGroupByExprs.size !=
selectedGroupByExprs.map(_.map(_.semanticHash()).toSet).distinct.size
selectedGroupByExprs.map(_.map(_.canonicalized).toSet).distinct.size
val distinctGroupingSets = if (hasDuplicateGroups) {
val groupHashSet = mutable.Set[Set[Int]]()
val groupHashSet = mutable.Set[Set[Expression]]()
val initSet = mutable.ArrayBuffer[Seq[Expression]]()
selectedGroupByExprs.foldLeft(initSet) { case (b, gs) =>
val groupHash = gs.map(_.semanticHash()).toSet
val groupHash = gs.map(_.canonicalized).toSet
if (!groupHashSet.contains(groupHash)) {
groupHashSet += groupHash
b += gs
Expand Down

0 comments on commit 19a36b3

Please sign in to comment.