mustafasrepo commented on code in PR #11875:
URL: https://github.com/apache/datafusion/pull/11875#discussion_r1711683067


##########
datafusion/core/src/physical_optimizer/sort_pushdown.rs:
##########
@@ -132,6 +172,43 @@ fn pushdown_requirement_to_children(
             RequirementsCompatibility::Compatible(adjusted) => 
Ok(Some(vec![adjusted])),
             RequirementsCompatibility::NonCompatible => Ok(None),
         }
+    } else if let Some(sort_exec) = plan.as_any().downcast_ref::<SortExec>() {

Review Comment:
   I agree, we should find a better approach for handling these cases. We 
should either introduce new properties for operators , or as you said we should 
move this logic to methods. Either way we should somehow remove usages of the 
`.as_any().downcast_ref` usages in the rules.



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