[CALCITE-4912] Confusing javadoc of RexSimplify.simplify#2721
Merged
NobiGo merged 1 commit intoapache:masterfrom Feb 18, 2022
Merged
[CALCITE-4912] Confusing javadoc of RexSimplify.simplify#2721NobiGo merged 1 commit intoapache:masterfrom
NobiGo merged 1 commit intoapache:masterfrom
Conversation
wojustme
reviewed
Feb 17, 2022
| * | ||
| * <p>In particular:</p> | ||
| * <ul> | ||
| * <li>{@code simplify(x = 1 AND y = 2 AND NOT x = 1)} |
Contributor
There was a problem hiding this comment.
Origin doc maybe means reduce condition of x.
Why you change here?
Contributor
Author
There was a problem hiding this comment.
It is a wrong simplify.
Contributor
There was a problem hiding this comment.
@NobiGo Yes, you are right.
My description may not be very accurate.
I mean that this expression should return FALSE
Should we just change return's doc?
Contributor
Author
There was a problem hiding this comment.
No. What the expression should be returned is decided by how we treat the UNKNOW. For example:
x=1 AND NOT x=1
If UNKNOW as FALSE then return FALSE;
If UNKNOW as TRUE then return FALSE;
If UNKNOW as UNKNOW then return UNKNOW.(Then (x = 1 AND y = 2 AND NOT x = 1) result will not be a definite value)
Contributor
There was a problem hiding this comment.
Yes, It's my negligence
LTGM~
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.