buraksenn opened a new pull request, #14279: URL: https://github.com/apache/datafusion/pull/14279
## Which issue does this PR close? Closes #14226 ## Rationale for this change Details from #14226: The [`AnalysisContext`](https://github.com/apache/datafusion/blob/2aff98e002ce6d48008b8bbe2b38ee644a6d5c20/datafusion/physical-expr/src/analysis.rs#L38) which is the result of the [`analyze`](https://github.com/apache/datafusion/blob/2aff98e002ce6d48008b8bbe2b38ee644a6d5c20/datafusion/physical-expr/src/analysis.rs#L159) method for refining column boundaries from a physical expression represents an empty set the same as an unbounded set. For example, in the case where the bounds can not be shrunk, e.g., a < 0 OR a >= 0, this results an interval of [None, None], but means [-∞, ∞], i.e., [CERTAINLY_TRUE](https://github.com/apache/datafusion/blob/2aff98e002ce6d48008b8bbe2b38ee644a6d5c20/datafusion/expr-common/src/interval_arithmetic.rs#L419-L422). In the case where the bounds represent an empty set, e.g., a < 0 AND a > 0, this also results in an interval of [None, None], but should mean [CERTAINLY_FALSE](https://github.com/apache/datafusion/blob/2aff98e002ce6d48008b8bbe2b38ee644a6d5c20/datafusion/expr-common/src/interval_arithmetic.rs#L409). ## What changes are included in this PR? - Change AnalysisContext boundaries to be Option to represent empty set ## Are these changes tested? Added unit tests. Also existing tests do not fail ## Are there any user-facing changes? I think this breaks public API but I could not find any other way to do this without it. -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org