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

Adding support for comment in table/view #104

Merged
merged 4 commits into from
Oct 9, 2024

Conversation

sharadgaur
Copy link
Contributor

@sharadgaur sharadgaur commented Oct 8, 2024

Adding Table/View Comment Support as per document https://clickhouse.com/docs/en/sql-reference/statements/create/table
#105
Example:

CREATE TABLE IF NOT EXISTS test.events_local (
    f0 String,
    f1 String CODEC(ZSTD(1)),
    f2 VARCHAR(255),
    f3 Datetime,
    f4 Datetime,
    f5 Map(String,String),
    f6 String,
    f8 Datetime DEFAULT now(),
    f9 String MATERIALIZED toString(f7['f70']),
    f10 String ALIAS f11,
) ENGINE = MergeTree
PRIMARY KEY (f0, f1, f2)
PARTITION BY toYYYYMMDD(f3)
TTL f3 + INTERVAL 6 MONTH
ORDER BY (f1,f2,f3)
COMMENT 'Comment for table';


Signed-off-by: Sharad Gaur <sharadgaur@gmail.com>
@coveralls
Copy link

coveralls commented Oct 8, 2024

Pull Request Test Coverage Report for Build 11253730392

Details

  • 19 of 23 (82.61%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 59.682%

Changes Missing Coverage Covered Lines Changed/Added Lines %
parser/parser_table.go 3 5 60.0%
parser/parser_view.go 3 5 60.0%
Totals Coverage Status
Change from base Build 11227639957: 0.05%
Covered Lines: 6260
Relevant Lines: 10489

💛 - Coveralls

Signed-off-by: Sharad Gaur <sharadgaur@gmail.com>
@sharadgaur sharadgaur changed the title Adding support to table comment Adding support for comment in table/view Oct 8, 2024
parser/parser_test.go Outdated Show resolved Hide resolved
@git-hulk
Copy link
Member

git-hulk commented Oct 9, 2024

Generally looks good, just one comment inline. Thank you!

Signed-off-by: Sharad Gaur <sharadgaur@gmail.com>
parser/parser_test.go Outdated Show resolved Hide resolved
@git-hulk git-hulk merged commit 004bbd6 into AfterShip:master Oct 9, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants