Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update code
  • Loading branch information
beliefer committed Aug 8, 2022
commit a920f4518971293188929b74c0b5dd9d5ddb6b2f
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,8 @@ object V2ScanRelationPushDown extends Rule[LogicalPlan] with PredicateHelper {
case s @ Sort(order, _, operation @ PhysicalOperation(project, Nil, sHolder: ScanBuilderHolder))
// Without building the Scan, we do not know the resulting column names after aggregate
// push-down, and thus can't push down Top-N which needs to know the ordering column names.
// TODO: we can support simple cases like GROUP BY columns directly and ORDER BY the same
// columns, which we know the resulting column names: the original table columns.
// In particular, we push down the simple cases like GROUP BY expressions directly and
// ORDER BY the same expressions, which we know the original table columns.
if CollapseProject.canCollapseExpressions(order, project, alwaysInline = true) =>
val aliasMap = getAliasMap(project)
def findGroupExprForSortOrder(sortOrder: SortOrder): SortOrder = sortOrder match {
Expand Down