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

Property graph names are not case insensitive #176

Closed
2 tasks done
Dtenwolde opened this issue Dec 12, 2024 · 1 comment
Closed
2 tasks done

Property graph names are not case insensitive #176

Dtenwolde opened this issue Dec 12, 2024 · 1 comment
Labels
bug Something isn't working reproduced

Comments

@Dtenwolde
Copy link
Contributor

What happens?

The property graph names are not consistently case insensitive in the current implementation.
Note in the following examples there is socialNetwork and SocialNetwork (Capitalization of the S)

SELECT count(id)
   FROM
     GRAPH_TABLE (socialNetwork
       MATCH p = ANY SHORTEST (p1:person WHERE p1.name='Bob')
   -[f:follows]-> *(p2:person)
           -[l:livesIn]->(c:city WHERE c.name='Utrecht')
       COLUMNS (p2.id));

Results in:

Binder Error: Property graph socialNetwork does not exist

But then running the following create property graph query:

CREATE PROPERTY GRAPH SocialNetwork
      VERTEX TABLES (
        person,
        city
      )
      EDGE TABLES (
        follows    SOURCE KEY (p1id) REFERENCES person (id)
                      DESTINATION KEY (p2id) REFERENCES person (id),
        livesin    SOURCE KEY (personid) REFERENCES person (id)
                    DESTINATION KEY (cityid) REFERENCES city (id)
    );

Results in:

Invalid Error: Property graph table with name SocialNetwork already exists

To Reproduce

CREATE TABLE city (
  id bigint PRIMARY KEY,
  name varchar
);


CREATE TABLE person (
  id bigint PRIMARY KEY,
  name varchar
);
CREATE TABLE livesIn (
  personid bigint,
  cityid bigint
);

CREATE TABLE follows (
  p1id bigint,
  p2id bigint
);
CREATE PROPERTY GRAPH SocialNetwork
  VERTEX TABLES (
	person, 
	city
  )
  EDGE TABLES (
	follows	SOURCE KEY (p1id) REFERENCES person (id)
			  	DESTINATION KEY (p2id) REFERENCES person (id),
	livesin	SOURCE KEY (personid) REFERENCES person (id)
				DESTINATION KEY (cityid) REFERENCES city (id)
);
SELECT count(id)
FROM
  GRAPH_TABLE (socialNetwork 
    MATCH p = ANY SHORTEST (p1:person WHERE p1.name='Bob') 
-[f:follows]-> *(p2:person)
        -[l:livesIn]->(c:city WHERE c.name='Utrecht')
    COLUMNS (p2.id));

Results in:

Binder Error: Property graph socialNetwork does not exist

OS:

macOs 13 - Apple M1 Pro

DuckDB Version:

v1.1.3

DuckDB Client:

CLI

Full Name:

Daniel ten Wolde

Affiliation:

CWI

How did you load the extension?

Community extension version

Did you include all relevant data sets for reproducing the issue?

Yes

Did you include all code required to reproduce the issue?

  • Yes, I have

Did you include all relevant configuration (e.g., CPU architecture, Python version, Linux distribution) to reproduce the issue?

  • Yes, I have
@Dtenwolde
Copy link
Contributor Author

Fixed in #188

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

No branches or pull requests

1 participant