Skip to content

SQL contains ISNULL function in select clause parsing always failed. #610

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

Closed
wants to merge 10 commits into from
Closed

Conversation

KyongSik-Yoon
Copy link
Contributor

There is some change related with ISNULL in 1.3 version.
I found ISNULL expression now supporting. But ISNULL also can be used sql function in MicroSoft SQL Server.
I fixed it by little change to jjt file.
In my fix ISNULL used to both FUNCTION and EXPRESSION so I'm not sure this is right way or not.
Anyway SQL containing ISNULL function possible to parse and deparse.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 86.66% when pulling 360f668 on KyongSik-Yoon:master into 49b2800 on JSQLParser:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 86.66% when pulling 360f668 on KyongSik-Yoon:master into 49b2800 on JSQLParser:master.

Copy link
Member

@wumpz wumpz left a comment

Choose a reason for hiding this comment

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

You are right. Any objections if I squash your commits? What does this visitor do in your test? Why not put the test into SelectTest?

@wumpz
Copy link
Member

wumpz commented May 2, 2018

Changes integrated. Sorry but I did not use your PR.

@wumpz wumpz closed this May 2, 2018
wumpz added a commit that referenced this pull request May 2, 2018
wumpz added a commit that referenced this pull request May 2, 2018
@damienb-opt
Copy link

Hello, it 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>

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