Skip to content

Invalid NOT query can be parsed without an error while ignoreParseErrors is disabled #201

Description

@ghingis
  • Feature
  • Bug

Description

This is a valid query:

SELECT AnnualRevenue FROM Account WHERE Name <> NULL AND (NOT (AnnualRevenue > 0))

This is also a valid query:

SELECT AnnualRevenue FROM Account WHERE Name <> NULL AND (NOT AnnualRevenue > 0)

And this is not a valid query:

SELECT AnnualRevenue FROM Account WHERE Name <> NULL AND NOT (AnnualRevenue > 0)

This will throw a unexpected token: 'NOT' on Salesforce.

Yet the parser can parse both without an issue.

EDIT: I added another scenario for a valid query if the negated term is only a single expression.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions