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

Bug: REL TABLE GROUP: Error: Parser exception: Invalid input <, FROM>: expected rule kU_CreateRelTableGroup (caused by whitespace) #3543

Closed
sapalli2989 opened this issue May 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@sapalli2989
Copy link
Contributor

sapalli2989 commented May 26, 2024

Kùzu version

v0.4.2

What happened?

CREATE REL TABLE GROUP X (...) causes

Error: Parser exception: Invalid input <, FROM>: expected rule kU_CreateRelTableGroup (line: 1, offset: 257)

, despite being syntactically correct. It turns out to be a problem with whitespaces surrounding terms defined within parentheses.

Are there known steps to reproduce?

CREATE NODE TABLE V1 (id UUID, PRIMARY KEY (id));
CREATE NODE TABLE V2 (id UUID, PRIMARY KEY (id));

// auto-generated statement
// This caused error
CREATE REL TABLE GROUP has (
                            FROM V1
                            TO V1
                            ,
                            FROM V1
                            TO V2
                            ,
                            FROM V2
                            TO V2
                            , ONE_MANY);

// corresponds to (and also causes error)
CREATE REL TABLE GROUP has (  FROM V1  TO V1  ,  FROM V1  TO V2  ,  FROM V2  TO V2  , ONE_MANY);

// removing trailing whitespace after `TO <table>` works
CREATE REL TABLE GROUP has (  FROM V1  TO V1,  FROM V1  TO V2,  FROM V2  TO V2, ONE_MANY);
@sapalli2989 sapalli2989 added the bug Something isn't working label May 26, 2024
@andyfengHKU
Copy link
Contributor

This should be fixed in #3549

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants