Github user cloud-fan commented on the pull request: https://github.com/apache/spark/pull/9123#issuecomment-148306333 I wanna explain a bit more about this bug. When we resolve sort ordering, we will use a [special method](https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala#L429-L447), which only resolves `UnresolvedAttributes` and `UnresolvedExtractValue`. However, for something like `Floor('a)`, even the `'a` is resolved, the floor expression may still being unresolved as data type mismatch(for example, `'a` is string type and `Floor` need double type), thus can't pass [this filter](https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala#L485), and we can't push down this missing attribute `'a`.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org