Skip to content

Add support of the ENUM8|ENUM16 for ClickHouse dialect #1574

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

Merged
merged 3 commits into from
Dec 5, 2024

Conversation

git-hulk
Copy link
Member

For the documentation, please refer to:

https://clickhouse.com/docs/en/sql-reference/data-types/enum

@@ -1049,18 +1049,18 @@ impl<'a> Parser<'a> {
| Keyword::CURRENT_USER
| Keyword::SESSION_USER
| Keyword::USER
if dialect_of!(self is PostgreSqlDialect | GenericDialect) =>
Copy link
Member Author

@git-hulk git-hulk Nov 30, 2024

Choose a reason for hiding this comment

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

The following parts are auto-formatted by the command: cargo format.

Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder why it just happened now 🤔 Is it possible you are using nightly rust 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

@alamb aha, I'm using 1.82.0 on my side.

@git-hulk
Copy link
Member Author

cc @iffyio

@git-hulk git-hulk force-pushed the feature/clickhouse-enum-values branch 2 times, most recently from b93706e to 070d38a Compare December 1, 2024 13:24
@git-hulk git-hulk requested a review from iffyio December 1, 2024 13:25
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.

Thanks @git-hulk

@@ -1049,18 +1049,18 @@ impl<'a> Parser<'a> {
| Keyword::CURRENT_USER
| Keyword::SESSION_USER
| Keyword::USER
if dialect_of!(self is PostgreSqlDialect | GenericDialect) =>
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder why it just happened now 🤔 Is it possible you are using nightly rust 🤔

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.

Thanks @git-hulk! The changes look good to me, just one minor comment/question on the assert import, also double checking the formatting changes sounded from the thread that they were local and need a follow up?

@git-hulk git-hulk force-pushed the feature/clickhouse-enum-values branch from 77c567c to 7d4eee6 Compare December 4, 2024 03:14
@git-hulk
Copy link
Member Author

git-hulk commented Dec 4, 2024

also double checking the formatting changes sounded from the thread that they were local and need a follow up?

It seems the fmt behavior changed in the newer version. To see if @alamb has any comments.

@git-hulk git-hulk force-pushed the feature/clickhouse-enum-values branch from 7d4eee6 to db93860 Compare December 4, 2024 03:17
@git-hulk git-hulk requested review from iffyio and alamb December 4, 2024 03:18
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 - thanks @git-hulk

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!

@iffyio iffyio merged commit dd7ba72 into apache:main Dec 5, 2024
8 checks passed
@git-hulk git-hulk deleted the feature/clickhouse-enum-values branch December 6, 2024 01:52
hansott added a commit to AikidoSec/datafusion-sqlparser-rs that referenced this pull request Dec 26, 2024
 into update

* tag 'v0.53.0' of https://github.com/apache/datafusion-sqlparser-rs: (66 commits)
  Run cargo fmt in derive crate
  Add Apache license header to spans.rs
  Update version to 0.53.0 and add release notes (apache#1592)
  Add support for ODBC functions (apache#1585)
  Parse `INSERT` with subquery when lacking column names (apache#1586)
  Support INSERT OVERWRITE INTO syntax (apache#1584)
  Snowflake ALTER TABLE clustering options (apache#1579)
  Parse Snowflake USE ROLE and USE SECONDARY ROLES (apache#1578)
  Add support of the ENUM8|ENUM16 for ClickHouse dialect (apache#1574)
  Fix displaying WORK or TRANSACTION after BEGIN (apache#1565)
  Support parsing optional nulls handling for unique constraint (apache#1567)
  Support BIT column types (apache#1577)
  Encapsulate CreateFunction (apache#1573)
  Support Databricks struct literal (apache#1542)
  Update comments / docs for `Spanned` (apache#1549)
  Support snowflake double dot notation for object name (apache#1540)
  `json_object('k' VALUE 'v')` in postgres (apache#1547)
  Increase version of sqlparser_derive from 0.2.2 to 0.3.0 (apache#1571)
  Support MySQL size variants for BLOB and TEXT columns (apache#1564)
  Rename `TokenWithLocation` to `TokenWithSpan`, in backwards compatible way (apache#1562)
  ...
hansott added a commit to AikidoSec/datafusion-sqlparser-rs that referenced this pull request Dec 26, 2024
… into sqlitedollar

* 'update' of github.com:AikidoSec/datafusion-sqlparser-rs: (66 commits)
  Run cargo fmt in derive crate
  Add Apache license header to spans.rs
  Update version to 0.53.0 and add release notes (apache#1592)
  Add support for ODBC functions (apache#1585)
  Parse `INSERT` with subquery when lacking column names (apache#1586)
  Support INSERT OVERWRITE INTO syntax (apache#1584)
  Snowflake ALTER TABLE clustering options (apache#1579)
  Parse Snowflake USE ROLE and USE SECONDARY ROLES (apache#1578)
  Add support of the ENUM8|ENUM16 for ClickHouse dialect (apache#1574)
  Fix displaying WORK or TRANSACTION after BEGIN (apache#1565)
  Support parsing optional nulls handling for unique constraint (apache#1567)
  Support BIT column types (apache#1577)
  Encapsulate CreateFunction (apache#1573)
  Support Databricks struct literal (apache#1542)
  Update comments / docs for `Spanned` (apache#1549)
  Support snowflake double dot notation for object name (apache#1540)
  `json_object('k' VALUE 'v')` in postgres (apache#1547)
  Increase version of sqlparser_derive from 0.2.2 to 0.3.0 (apache#1571)
  Support MySQL size variants for BLOB and TEXT columns (apache#1564)
  Rename `TokenWithLocation` to `TokenWithSpan`, in backwards compatible way (apache#1562)
  ...
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