cloud-fan commented on a change in pull request #35710:
URL: https://github.com/apache/spark/pull/35710#discussion_r833976669
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/PushDownUtils.scala
##########
@@ -129,11 +129,15 @@ object PushDownUtils extends PredicateHelper {
/**
* Pushes down top N to the data source Scan
*/
- def pushTopN(scanBuilder: ScanBuilder, order: Array[SortOrder], limit: Int):
Boolean = {
+ def pushTopN(
+ scanBuilder: ScanBuilder,
+ order: Array[SortOrder],
+ limit: Int): (Boolean, Boolean) = {
scanBuilder match {
case s: SupportsPushDownTopN =>
- s.pushTopN(order, limit)
- case _ => false
+ val isPushed = s.pushTopN(order, limit)
+ (isPushed, s.isPartiallyPushed)
Review comment:
We should only call `isPartiallyPushed` if `pushTopN` returns true
```
if (isPushed) (true, s.isPartiallyPushed) else (false, false)
```
--
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]