Skip to content

SQL contains ISNULL function in select clause parsing fails if used with NOT #733

Closed

Description

@damienb-opt

The fix for ISNULL as a keyword or as a function doesn't work with NOT as a prefix:

    @Test
    public void testSqlContainIsNullFunctionShouldBeParsed3() throws JSQLParserException {
        assertSqlCanBeParsedAndDeparsed("SELECT name, age FROM person WHERE NOT ISNULL(home, 'earn more money')");
    }

results in:

    at line 1, column 46.

Was expecting one of:

    "&&"
    ";"
    "AND"
    "CONNECT"
    "EXCEPT"
    "FOR"
    "GROUP"
    "HAVING"
    "INTERSECT"
    "MINUS"
    "ORDER"
    "START"
    "UNION"
    <EOF>

Originally posted by @damienb-opt in #610 (comment)

Activity

  1. tomershay commented on Jan 19, 2019

    @tomershay
    Contributor

    Ran into this issue as well. An example to reproduce the issue:
    SELECT col from tbl WHERE NOT ISNULL(col)
    This query is valid in many different databases.

  2. wumpz commented on Feb 10, 2019

    @wumpz
    Member

    already fixed

  3. added a commit that references this issue on Feb 16, 2019
    4146430
  4. added a commit that references this issue on Feb 19, 2019
    2830c17
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