godfreyhe commented on a change in pull request #8051: [FLINK-12018] [table-planner-blink] Add support for generating optimized logical plan for Sort and Rank URL: https://github.com/apache/flink/pull/8051#discussion_r270266970
########## File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/nodes/physical/stream/StreamExecSort.scala ########## @@ -38,16 +38,22 @@ import org.apache.calcite.rex.RexNode * <p>''SELECT * FROM TABLE ORDER BY ROWTIME, a'' will be converted to [[StreamExecTemporalSort]] * <p>''SELECT * FROM TABLE ORDER BY a LIMIT 2'' will be converted to [[StreamExecRank]] Review comment: The basic strategy for selecting a sort/rank operator is a query will be converted to `StreamExecTemporalSort`, `StreamExecFirstLastRow` or `StreamExecRank` as much as possible, otherwise it will be converted to `StreamExecSort`. Currently, `StreamExecSort` is only used for testing with bounded source. So, in product environment, `StreamExecSort` is disabled, and an exception will be thrown if a query is converted to `StreamExecSort`. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services