xinglijun1973 opened a new pull request, #20257:
URL: https://github.com/apache/shardingsphere/pull/20257

   Fixes #14334, #13814:
   Oracle pagination and sorting doesn' t work properly #14334,
   Using sum function does not return data #13814.
   
   Changes proposed in this pull request:
   -if use oracle's rownun alias in where, it means use the "order by"/"group 
by" exists in  the rownum's from sub query, 
   ex: `select * from (select t.*, rownum r from (select * from a order by 
a.name)t ) where r<10`
   will rewrite to:
   `select * from (select t.*, rownum r from (select * from a order by a.name)t 
) where r<10 orde by name`, so
   -first, resolve ‘rownum alias’ and ‘the indeed oracelSelectStatement’ 
relation in `OracleDMLStatementVisitor`, save the relation in 
`OracelSelectStatement.rowNumSelect` map
   -second, using the relation above, in `SelectStatementContext`, if use 
rownum alias in where, update 'order by'/'group by' context.
   


-- 
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]

Reply via email to