Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ulysses-you committed Aug 10, 2024
1 parent 94ace2d commit a1cb22c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ object InsertMapSortInGroupingExpressions extends Rule[LogicalPlan] {
val inserted = insertMapSortRecursively(expr)
if (expr.ne(inserted)) {
exprToMapSort.getOrElseUpdate(
expr.canonicalized, Alias(inserted, "_groupingmapsort")())
.toAttribute
expr.canonicalized,
Alias(inserted, "_groupingmapsort")()
).toAttribute
} else {
expr
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,9 @@ abstract class Optimizer(catalogManager: CatalogManager)
ReplaceExpressions,
RewriteNonCorrelatedExists,
PullOutGroupingExpressions,
// Put `InsertMapSortInGroupingExpressions` after `PullOutGroupingExpressions`,
// so the grouping keys can only be attribute and literal which makes
// `InsertMapSortInGroupingExpressions` easy to insert `MapSort`.
InsertMapSortInGroupingExpressions,
ComputeCurrentTime,
ReplaceCurrentLike(catalogManager),
Expand Down

0 comments on commit a1cb22c

Please sign in to comment.