yikf commented on a change in pull request #34738:
URL: https://github.com/apache/spark/pull/34738#discussion_r758343688



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/V2ScanRelationPushDown.scala
##########
@@ -255,7 +256,20 @@ object V2ScanRelationPushDown extends Rule[LogicalPlan] 
with PredicateHelper {
             sHolder.pushedLimit = Some(limitValue)
           }
           globalLimit
-        case _ => globalLimit
+        case _ =>
+          child transform {
+            case sort @ Sort(order, _, ScanOperation(_, filter, sHolder: 
ScanBuilderHolder))
+              if filter.length == 0 =>
+              val orders = DataSourceStrategy.translateSortOrders(order)

Review comment:
       1. The improve is pushDown in V2 Relation, Is it necessary to in the 
DataSourceV2Strategy
   2. Optimizer rely the DataSourceStrategy, As if the upper layer depended on 
lower layer




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