morrySnow commented on code in PR #19438: URL: https://github.com/apache/doris/pull/19438#discussion_r1193849094
########## fe/fe-core/src/main/java/org/apache/doris/analysis/SelectStmt.java: ########## @@ -2629,4 +2650,29 @@ private static Map<SlotRef, Expr> getExpectedBinaryPredicates( return null; } } + + private boolean isAddDefaultOrderBy() { + if (ConnectContext.get() == null + || ConnectContext.get().getSessionVariable() == null + || !ConnectContext.get().getSessionVariable().isEnableDefaultOrder()) { + return false; + } + if (fromInsert || analyzer.getAliases().size() != 1 || groupByClause != null + || havingClause != null || aggInfo != null || analyticInfo != null) { + return false; + } + if (getTableRefs().size() != 1 || !(getTableRefs().get(0) instanceof BaseTableRef) + || getTableRefs().get(0).getTable().getType() != TableType.OLAP) { + return false; + } Review Comment: u do not process lateral view at all -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org