Skip to content

DuckDB: Support CREATE TABLE PARTITIONED BY expressions - #2504

Open
corasaurus-hex wants to merge 1 commit into
apache:mainfrom
corasaurus-hex:duckdb-partitioned-by-expressions
Open

DuckDB: Support CREATE TABLE PARTITIONED BY expressions#2504
corasaurus-hex wants to merge 1 commit into
apache:mainfrom
corasaurus-hex:duckdb-partitioned-by-expressions

Conversation

@corasaurus-hex

Copy link
Copy Markdown

What is this?

Adds support for expressions in DuckDB's CREATE TABLE ... PARTITIONED BY (...) clause.

CREATE TABLE events (id INTEGER) PARTITIONED BY (id + 1);

Introduced in DuckDB 1.5.0 (syntax change).

@LucaCappelletti94 LucaCappelletti94 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just did a quick look through for now, will review more thoroughly later

Comment thread src/ast/ddl.rs
/// Hive: Table clustering column list.
/// <https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateTable>
pub clustered_by: Option<ClusteredBy>,
/// DuckDB partition expressions, distinct from Hive partition columns.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

add documentation link

Comment thread src/dialect/mod.rs
false
}

/// Uses expressions rather than column declarations in `PARTITIONED BY`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

may require some reference SQL doc link

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.

2 participants