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: Simplify SQL syntax that specifies timestamp key column #140

Merged
merged 6 commits into from
Aug 1, 2022

Conversation

dust1
Copy link
Contributor

@dust1 dust1 commented Jul 25, 2022

Which issue does this PR close?

Closes #115
ref #154

Rationale for this change

What changes are included in this PR?

I added 3 structs just to transmit the is_timestamp tag.
in ast.rs

Are there any user-facing changes?

now, user can use this sql to create table.

CREATE TABLE demo (
    name string TAG,
    value double NOT NULL,
    t timestamp NOT NULL TIMESTAMP KEY
) ENGINE=Analytic;

How does this change test

note

image

sql/src/ast.rs Outdated Show resolved Hide resolved
@waynexia waynexia requested review from ShiKaiWi and jiacai2050 July 25, 2022 12:32
@ShiKaiWi ShiKaiWi removed their request for review July 26, 2022 02:06
@waynexia waynexia changed the title Simplify SQL syntax that specifies timestamp key column feat: Simplify SQL syntax that specifies timestamp key column Jul 26, 2022
@waynexia waynexia added the A-SQL Area: SQL layer label Jul 26, 2022
sql/src/ast.rs Outdated Show resolved Hide resolved
@waynexia
Copy link
Member

We now have integration test suite for this kind of changes. Would you like to add this new syntax to it? Maybe some new SQLs in https://github.com/CeresDB/ceresdb/blob/main/tests/cases/local/05_ddl/create_tables.sql 🤗

@dust1
Copy link
Contributor Author

dust1 commented Jul 27, 2022

We now have integration test suite for this kind of changes. Would you like to add this new syntax to it? Maybe some new SQLs in https://github.com/CeresDB/ceresdb/blob/main/tests/cases/local/05_ddl/create_tables.sql 🤗

sure! not adding test cases is my mistake😂

@waynexia
Copy link
Member

We now have integration test suite for this kind of changes. Would you like to add this new syntax to it? Maybe some new SQLs in https://github.com/CeresDB/ceresdb/blob/main/tests/cases/local/05_ddl/create_tables.sql 🤗

sure! not adding test cases is my mistake😂

Not your fault! This is newly added. I'll add it to our dev guide

sql/src/parser.rs Outdated Show resolved Hide resolved
sql/src/parser.rs Outdated Show resolved Hide resolved
sql/src/parser.rs Outdated Show resolved Hide resolved
sql/src/parser.rs Outdated Show resolved Hide resolved
@ShiKaiWi
Copy link
Member

@dust1 Thanks. It looks much better but I guess it can be made more simple.

Copy link
Member

@ShiKaiWi ShiKaiWi left a comment

Choose a reason for hiding this comment

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

@dust1 Now it looks clean and pretty. And now maybe we should pay some attention to user's wrong use case.

sql/src/parser.rs Outdated Show resolved Hide resolved
Copy link
Member

@ShiKaiWi ShiKaiWi left a comment

Choose a reason for hiding this comment

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

Thanks!

@ShiKaiWi ShiKaiWi merged commit 4ce8ea4 into apache:main Aug 1, 2022
@dust1 dust1 deleted the issue115 branch August 1, 2022 03:33
chunshao90 pushed a commit to chunshao90/ceresdb that referenced this pull request May 15, 2023
…#140)

* Simplify SQL syntax that specifies timestamp key column

* Typo: Ceres

* use ColumnOption::DialectSpecific

* simplicity of the parse_columns.

* not allowed define mutiple tskey constraints.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-SQL Area: SQL layer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simplify SQL syntax that specifies timestamp key column
4 participants