Github user sameeragarwal commented on the pull request: https://github.com/apache/spark/pull/11649#issuecomment-195611317 @marmbrus the reason for adding these inferred filters in the logical plan is because we currently only propagate constraints in the logical plan (and they are not directly accessible during code generation). In theory, we can propagate constraints in the physical plan instead but that'd be slightly unclean (since we'd then need to add propagation logic for all individual physical operators). @nongli, @yhuai and I briefly discussed the pros and cons of the 2 approaches yesterday and then decided to go with the current approach. PS: Added comments in https://github.com/apache/spark/pull/11665.
--- 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