Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix not bug #1144

Merged
merged 1 commit into from
Mar 7, 2022
Merged

Fix not bug #1144

merged 1 commit into from
Mar 7, 2022

Conversation

sbayer55
Copy link
Member

@sbayer55 sbayer55 commented Mar 7, 2022

Signed-off-by: Steven Bayer smbayer@amazon.com

Description

Update the types the not operator will accept.

unaryNotOperatorExpression
    : unaryOperator parenthesesExpression
    | unaryOperator primary
    ;

Issues Resolved

Previously not operator accepted any conditional statement. The order of operations parsed did not match the order defined in #1005

Check List

  • New functionality includes testing.
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Steven Bayer <smbayer@amazon.com>
@sbayer55 sbayer55 requested a review from a team as a code owner March 7, 2022 15:59
Copy link
Collaborator

@chenqi0805 chenqi0805 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the quick fix!

Copy link
Contributor

@sshivanii sshivanii left a comment

Choose a reason for hiding this comment

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

Looks good!

@sbayer55 sbayer55 merged commit 818d9cb into opensearch-project:main Mar 7, 2022
Copy link
Contributor

@cmanning09 cmanning09 left a comment

Choose a reason for hiding this comment

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

Hey @sbayer55, interesting find. Is my understand that this fix changes our expression language from writing expressions with the not operator from:

NOT "/foo/bar" == 5

to:

NOT ("/foo/bar" == 5)
NOT { 5 }
NOT "/foo/bar"
NOT someVariableName

I am not sure about that last one. Are we supporting variableNames for 1.3?

@sbayer55 sbayer55 deleted the not-bug branch March 17, 2022 14:30
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.

4 participants