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 MATERIALIZED/ALIAS/EPHERMERAL default column options for ClickHouse #1348

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

git-hulk
Copy link
Member

ClickHouse supports using MATERIALIZED/ALIAS/EPHEMERAL expression to set the default value while creating a table.

For detailed syntax, please refer to: https://clickhouse.com/docs/en/sql-reference/statements/create/table#default_values

…or ClickHouse

ClickHouse supports using MATERIAILZED/ALIAS/EPHERMERAL expression to
set the default value while creating table.

For detailed syntax, please refer to: https://clickhouse.com/docs/en/sql-reference/statements/create/table#default_values
@git-hulk git-hulk force-pushed the feature/column-def-alias-materialized branch from eb983e5 to f8ca47c Compare July 23, 2024 10:44
@coveralls
Copy link

coveralls commented Jul 23, 2024

Pull Request Test Coverage Report for Build 10057468983

Details

  • 82 of 82 (100.0%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.03%) to 89.256%

Files with Coverage Reduction New Missed Lines %
src/ast/ddl.rs 1 86.37%
Totals Coverage Status
Change from base Build 10047415603: 0.03%
Covered Lines: 27225
Relevant Lines: 30502

💛 - Coveralls

@git-hulk
Copy link
Member Author

cc @iffyio

"CREATE TABLE table (",
"a DATETIME MATERIALIZED now(),",
" b DATETIME EPHEMERAL now(),",
" c DATETIME EPHEMERAL,",
Copy link
Contributor

Choose a reason for hiding this comment

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

thank you for testing the optional expression

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.

looks good to me -- thank you @git-hulk

@alamb alamb merged commit 390d4d3 into apache:main Jul 23, 2024
10 checks passed
lustefaniak pushed a commit to getsynq/sqlparser-rs that referenced this pull request Sep 11, 2024
…or ClickHouse (apache#1348)

# Conflicts:
#	src/ast/ddl.rs
#	src/keywords.rs
#	tests/sqlparser_clickhouse.rs
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.

3 participants