zhengshiJ commented on code in PR #10227:
URL: https://github.com/apache/doris/pull/10227#discussion_r901410797
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java:
##########
@@ -132,11 +153,18 @@ private LogicalPlan plan(ParserRuleContext tree) {
public LogicalPlan visitQuery(QueryContext ctx) {
Supplier<LogicalPlan> f = () -> {
// TODO: need to add withQueryResultClauses and withCTE
- return plan(ctx.queryTerm());
+ LogicalPlan query = plan(ctx.queryTerm());
+ LogicalPlan queryOrganization =
withQueryOrganization(ctx.queryOrganization(), query);
+ return queryOrganization == null ? query : queryOrganization;
};
return ParserUtils.withOrigin(ctx, f);
}
+ private LogicalPlan withQueryOrganization(QueryOrganizationContext ctx,
LogicalPlan children) {
+ List<SortItems> sortItems = visitQueryOrganization(ctx);
+ return sortItems == null ? null : new LogicalUnaryPlan(new
LogicalSort(sortItems), children);
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]