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

Parquet tables don't respect primary keys #975

Closed
rebasedming opened this issue Mar 11, 2024 · 0 comments · Fixed by #1006
Closed

Parquet tables don't respect primary keys #975

rebasedming opened this issue Mar 11, 2024 · 0 comments · Fixed by #1006
Assignees
Labels
bug Something isn't working priority-1-high High priority issue

Comments

@rebasedming
Copy link
Collaborator

Bug Description
It is possible to insert duplicate values into a primary key column.

How To Reproduce

CREATE TABLE users (id integer primary key, name text, email text) USING parquet;
INSERT INTO users(id, name, email)
VALUES(1, 'John Doe', 'john@example.com');
-- This should not be allowed, but it is
INSERT INTO users(id, name, email)
VALUES(1, 'John Doe', 'john@example.com');
-- Now we have a duplicate primary key
SELECT * FROM users;
 id |   name   |      email
----+----------+------------------
  1 | John Doe | john@example.com
  1 | John Doe | john@example.com
(2 rows)

Proposed Fix

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

Successfully merging a pull request may close this issue.

2 participants