Gabriel39 commented on code in PR #16514: URL: https://github.com/apache/doris/pull/16514#discussion_r1101345616
########## fe/fe-core/src/main/java/org/apache/doris/planner/OriginalPlanner.java: ########## @@ -448,6 +448,7 @@ private void checkAndSetTopnOpt(PlanNode node) { SortNode sortNode = (SortNode) node; PlanNode child = sortNode.getChild(0); if (child instanceof OlapScanNode && sortNode.getLimit() > 0 + && sortNode.getLimit() <= ConnectContext.get().getSessionVariable().topnOptLimitThreshold Review Comment: I'm not sure if session will be null here. Such as this is a load task or read by a flink/spark connertor? -- 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