beliefer opened a new pull request, #38689:
URL: https://github.com/apache/spark/pull/38689

   ### What changes were proposed in this pull request?
   Sometimes, the SQL exists filter which condition compares rank-like window 
functions with number. For example,
   `SELECT *, ROW_NUMBER() OVER(ORDER BY a) AS rn FROM Tab1 WHERE rn <= 5`
   We can create a `Limit(5)` and push down it as the child of `Window`.
   `SELECT *, ROW_NUMBER() OVER(ORDER BY a) AS rn FROM (SELECT * FROM Tab1 
ORDER BY a LIMIT 5) t`
   
   
   ### Why are the changes needed?
   Improve the performance.
   
   
   ### Does this PR introduce _any_ user-facing change?
   'No'.
   Just update the inner implementation.
   
   
   ### How was this patch tested?
   New tests.
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to