Github user cloud-fan commented on the issue: https://github.com/apache/spark/pull/20560 @rxin It seems you are talking about the followup PR: https://github.com/apache/spark/pull/21072 I think this is the way we do back propagation in catalyst: match a specific node, traverse down the subtree with the properties. For forward propagation, we also need to carefully handle some nodes that would stop the propagation. In `RemoveRedundantSorts.canEliminateSort`, we are doing the same thing: only list the nodes that can retain the properties. e.g. `Limit` should stop propagating the sorting property. I think `Project`, `Filter`, `Hint` is good enough as an initial list, we can expand it later.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org