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

feat(web-console): add DEDUP support in Copy schema to clipboard #235

Merged
merged 2 commits into from
Nov 16, 2023

Conversation

insmac
Copy link
Contributor

@insmac insmac commented Nov 16, 2023

Closes #184

Adding dedup configuration to table schema

If DEDUP UPSERT KEYS(key1, key2) has been used when creating a table, it should also be included in the generated DDL statement in Copy schema to clipboard.

Steps to test:

  1. Create a table that has deduplication enabled
CREATE TABLE TICKS (
    ts TIMESTAMP,
    tk SYMBOL,
    p DOUBLE
) TIMESTAMP(ts) PARTITION BY DAY WAL
DEDUP UPSERT KEYS(ts, tk);

INSERT INTO TICKS VALUES ('2023-07-14', 'QQQ', 78.56);
INSERT INTO TICKS VALUES ('2023-07-14', 'AAA', 78.56);
INSERT INTO TICKS VALUES ('2023-07-14', 'QQQ', 78.56); -- this is a dupe, won't be inserted
SELECT * FROM TICKS; -- should show 2 records

@insmac insmac added the web-console Issues relevant to "web-console" package label Nov 16, 2023
Copy link

@javier javier left a comment

Choose a reason for hiding this comment

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

it works as described!

@insmac insmac merged commit e5b323d into main Nov 16, 2023
2 checks passed
@insmac insmac deleted the web-console/dedupe-copy-schema branch November 16, 2023 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
web-console Issues relevant to "web-console" package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add DEDUP statement to Copy schema to clipboard feature
2 participants