We're updating the issue view to help you get more done. 

Normalize handling of negated predicates

Description

some examples best illutrate what I mean...

  1. (NOT (x LIKE y)) -> (x NOT_LIKE y)

  2. (NOT (NOT (x LIKE y))) -> (x LIKE y)

  3. (NOT (x NOT_LIKE y)) -> (x LIKE y)

One option would be to add a boolean negated flag to the visitor methods walking predicates indicating whether their context indicates a negation. For exmple, using the above illustrations, we'd have:

  1. (NOT (x LIKE y)) -> visitPredicate( `(x LIKE y)`, true) -> (x NOT_LIKE y)

  2. (NOT (NOT (x LIKE y))) -> visitPredicate( `(NOT (x LIKE y))`, true) -> visitPredicate( `(x LIKE y)`, false) -> (x LIKE y)

  3. (NOT (x NOT_LIKE y)) -> visitPredicate( `(x NOT_LIKE y)`, true) -> (x LIKE y)

Environment

None

Status

Assignee

Unassigned

Reporter

Steve Ebersole

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Priority

Major