Skip to content

Commit bd14f45

Browse files
committed
Add a feature flag for PARTITION BY
1 parent 2423914 commit bd14f45

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/sql/src/plan/statement/ddl.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ use crate::plan::{
160160
WebhookHeaders, WebhookValidation,
161161
};
162162
use crate::session::vars::{
163-
self, ENABLE_CLUSTER_SCHEDULE_REFRESH, ENABLE_KAFKA_SINK_HEADERS,
164-
ENABLE_KAFKA_SINK_PARTITION_BY, ENABLE_REFRESH_EVERY_MVS,
163+
self, ENABLE_CLUSTER_SCHEDULE_REFRESH, ENABLE_COLLECTION_PARTITION_BY,
164+
ENABLE_KAFKA_SINK_HEADERS, ENABLE_KAFKA_SINK_PARTITION_BY, ENABLE_REFRESH_EVERY_MVS,
165165
};
166166
use crate::{names, parse};
167167

@@ -2607,6 +2607,7 @@ pub fn plan_create_materialized_view(
26072607
}: MaterializedViewOptionExtracted = stmt.with_options.try_into()?;
26082608

26092609
if let Some(partition_by) = partition_by {
2610+
scx.require_feature_flag(&ENABLE_COLLECTION_PARTITION_BY)?;
26102611
let partition_by: Vec<_> = partition_by
26112612
.into_iter()
26122613
.map(normalize::column_name)

src/sql/src/session/vars/definitions.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1866,6 +1866,12 @@ feature_flags!(
18661866
default: false,
18671867
enable_for_item_parsing: true,
18681868
},
1869+
{
1870+
name: enable_collection_partition_by,
1871+
desc: "PARTITION BY",
1872+
default: false,
1873+
enable_for_item_parsing: true,
1874+
},
18691875
{
18701876
name: enable_multi_worker_storage_persist_sink,
18711877
desc: "multi-worker storage persist sink",

0 commit comments

Comments
 (0)