[CALCITE-6688] Allow operators of SqlKind.SYMMETRICAL to be reversed#4062
Merged
NobiGo merged 1 commit intoapache:mainfrom Dec 5, 2024
Merged
[CALCITE-6688] Allow operators of SqlKind.SYMMETRICAL to be reversed#4062NobiGo merged 1 commit intoapache:mainfrom
NobiGo merged 1 commit intoapache:mainfrom
Conversation
f4c5698 to
6274092
Compare
Contributor
|
You need some unit tests. |
Contributor
Author
|
Could you suggest another good test class to add to? There are some in |
Contributor
|
It would be great to have a test that reproduces the NPE that is mentioned in the JIRA issue. |
e16feb9 to
0f20939
Compare
mihaibudiu
approved these changes
Dec 2, 2024
NobiGo
requested changes
Dec 4, 2024
0f20939 to
c163798
Compare
|
Contributor
|
@NobiGo I will let you approve and merge this when you think you are happy with the requested changes. |
NobiGo
approved these changes
Dec 5, 2024
Contributor
Author
|
Thank you both for the review @NobiGo, @mihaibudiu! |
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.



SqlBasicFunctiondid not overrideSqlOperator#reverse()so functions belonging to theSqlKind.SYMMETRICALset threw a NPE during normalization.This PR adds a overridden
reverse()method toSqlBasicFunctionthat returns the operator ifisSymmetrical()is true.