BePPPower commented on code in PR #34422:
URL: https://github.com/apache/doris/pull/34422#discussion_r1599456341


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/trinoconnector/source/TrinoConnectorScanNode.java:
##########
@@ -137,17 +151,65 @@ public List<Split> getSplits() throws UserException {
         return splits;
     }
 
+    private void applyPushDown(ConnectorSession connectorSession) {
+        // push down predicate/filter
+        Optional<ConstraintApplicationResult<ConnectorTableHandle>> 
filterResult
+                = connectorMetadata.applyFilter(connectorSession, 
source.getTrinoConnectorTableHandle(), constraint);
+        if (filterResult.isPresent()) {
+            
source.setTrinoConnectorTableHandle(filterResult.get().getHandle());
+        }
+
+        // push down limit
+        if (hasLimit()) {
+            long limit = getLimit();
+            Optional<LimitApplicationResult<ConnectorTableHandle>> limitResult
+                    = connectorMetadata.applyLimit(connectorSession, 
source.getTrinoConnectorTableHandle(), limit);
+            if (limitResult.isPresent()) {
+                
source.setTrinoConnectorTableHandle(limitResult.get().getHandle());

Review Comment:
   This is not an issue because the content in ConnectorTableHandle has been 
incremented.



-- 
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: commits-unsubscr...@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to