Skip to content

[CALCITE-4912] Confusing javadoc of RexSimplify.simplify#2721

Merged
NobiGo merged 1 commit intoapache:masterfrom
NobiGo:CALCITE-4912
Feb 18, 2022
Merged

[CALCITE-4912] Confusing javadoc of RexSimplify.simplify#2721
NobiGo merged 1 commit intoapache:masterfrom
NobiGo:CALCITE-4912

Conversation

@NobiGo
Copy link
Copy Markdown
Contributor

@NobiGo NobiGo commented Feb 16, 2022

No description provided.

*
* <p>In particular:</p>
* <ul>
* <li>{@code simplify(x = 1 AND y = 2 AND NOT x = 1)}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Origin doc maybe means reduce condition of x.
Why you change here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a wrong simplify.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, It's my negligence
LTGM~

@NobiGo NobiGo merged commit 595da9b into apache:master Feb 18, 2022
@NobiGo NobiGo deleted the CALCITE-4912 branch April 16, 2022 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants