berkaysynnada opened a new pull request, #8276:
URL: https://github.com/apache/arrow-datafusion/pull/8276

   ## Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and 
enhancements and this helps us generate change logs for our releases. You can 
link an issue to this PR using the GitHub syntax. For example `Closes #123` 
indicates that this PR will close issue #123.
   -->
   
   Closes #.
   
   ## Rationale for this change
   
   <!--
    Why are you proposing this change? If this is already explained clearly in 
the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your 
changes and offer better suggestions for fixes.  
   -->
   
   This is a refactoring PR for the interval library `interval_arithmetic.rs`. 
The key points are:
   
   1) Move the interval library to the `expr` crate to make it accessible to 
logical plans.
   2) Do we really need a bound type? Adopting a convention of always using 
open or always closed intervals may simplify usage.
   3) There should be no possible ways to create invalid intervals.
   4) There must be no multiple representations of the same intervals.
   5) Support for multiplication (Mul) and division (Div).
   6) Improved cardinality calculation.
   7) Improved overflow handling.
   8) Expanded test coverage.
   9) Support for temporal types.
   10) Propagation of boolean intervals through comparison and equality 
operators.
   11) A more understandable API and documentation for the library and 
`cp_solver.rs` functions.
   
   ## What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is 
sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   This PR includes the following changes:
   
   1) Interval bounds are now always closed. For strict equality cases, we use 
one-step increase or decrease utilities.
   2) There is a single method for creating intervals, which always returns 
valid and standardized intervals.
   3) Added support for multiplication and division.
   4) Overflows are handled more intelligently.
   5) Cardinality calculation has been simplified and made more accurate.
   6) Temporal types are now supported.
   7) Boolean intervals can be propagated through logical operators.
   8) `OR` operator is supported.
   9) Documentation has been improved. The new structure makes future 
implementations easier.
   
   ## Are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are 
they covered by existing tests)?
   -->
   
   Yes, both with existing tests and newly added tests for new features.
   
   ## Are there any user-facing changes?
   
   <!--
   If there are user-facing changes then we may require documentation to be 
updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api 
change` label.
   -->


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

Reply via email to