You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/12/23 06:54:40 UTC

[GitHub] [shardingsphere] xinglijun1973 commented on a diff in pull request #20257: Fix Oracle pagination and sorting/grouping problem: add ‘order by’/'group by' of the subquery to its outer statement if the subquery selects oracle rownum

xinglijun1973 commented on code in PR #20257:
URL: https://github.com/apache/shardingsphere/pull/20257#discussion_r1056085782


##########
sql-parser/dialect/oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/impl/OracleDMLStatementSQLVisitor.java:
##########
@@ -512,6 +515,31 @@ public ASTNode visitQueryBlock(final QueryBlockContext ctx) {
         if (null != ctx.modelClause()) {
             result.setModelSegment((ModelSegment) visit(ctx.modelClause()));
         }
+        Map<String, OracleSelectStatement> rowNumSelect = getRowNumSelect(result);
+        if (rowNumSelect.size() > 0) {
+            result.setRowNumSelect(rowNumSelect);

Review Comment:
   great! I had tried.



-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org