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

Add support of parsing ON CLUSTER in ALTER TABLE for ClickHouse #1342

Merged
merged 3 commits into from
Jul 30, 2024

Conversation

git-hulk
Copy link
Member

ClickHouse dialect supports ON CLUSTER clause for ALTER TABLE:

ALTER TABLE table_name ON CLUSTER cluster_name ADD COLUMN c UInt32

Please refer to: https://clickhouse.com/docs/en/sql-reference/statements/alter

@coveralls
Copy link

coveralls commented Jul 16, 2024

Pull Request Test Coverage Report for Build 10144995334

Details

  • 34 of 40 (85.0%) changed or added relevant lines in 5 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.002%) to 89.229%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/ast/mod.rs 4 5 80.0%
tests/sqlparser_common.rs 20 25 80.0%
Files with Coverage Reduction New Missed Lines %
src/ast/mod.rs 1 81.47%
Totals Coverage Status
Change from base Build 10144601977: 0.002%
Covered Lines: 27221
Relevant Lines: 30507

💛 - Coveralls

@git-hulk git-hulk force-pushed the feature/alter-table-on-cluster branch from 87e3c4a to e69a978 Compare July 16, 2024 11:35
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @git-hulk

src/ast/dml.rs Show resolved Hide resolved
src/ast/mod.rs Outdated Show resolved Hide resolved
tests/sqlparser_clickhouse.rs Outdated Show resolved Hide resolved
tests/sqlparser_common.rs Outdated Show resolved Hide resolved
@git-hulk
Copy link
Member Author

The CI lint error would be fixed after PR #1352 or #1353 was merged

@git-hulk git-hulk requested a review from iffyio July 28, 2024 06:01
@lovasoa
Copy link
Contributor

lovasoa commented Jul 28, 2024

For the CI errors, they are not caused by the changes in this pr. #1357

git-hulk added 2 commits July 29, 2024 21:05
ClickHouse dialect supports `ON CLUSTER` clause for ALTER TABLE:

```sql
ALTER TABLE table_name ON CLUSTER cluster_name ADD COLUMN c UInt32
```

Please refer to: https://clickhouse.com/docs/en/sql-reference/statements/alter
@git-hulk git-hulk force-pushed the feature/alter-table-on-cluster branch from 5a78d6b to 97f47b5 Compare July 29, 2024 13:05
@git-hulk git-hulk force-pushed the feature/alter-table-on-cluster branch from 97f47b5 to 516714c Compare July 29, 2024 13:12
Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

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

LGTM! cc @alamb

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you (again) @git-hulk and @iffyio

@alamb alamb merged commit cc13841 into apache:main Jul 30, 2024
10 checks passed
git-hulk added a commit to git-hulk/sqlparser-rs that referenced this pull request Jul 31, 2024
ayman-sigma pushed a commit to sigmacomputing/sqlparser-rs that referenced this pull request Nov 19, 2024
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.

6 participants