@@ -11199,6 +11199,41 @@ FROM
1119911199 access: vec![PUBLIC_SELECT],
1120011200});
1120111201
11202+ pub static MZ_SHOW_REPLACEMENTS: LazyLock<BuiltinView> = LazyLock::new(|| BuiltinView {
11203+ name: "mz_show_replacements",
11204+ schema: MZ_INTERNAL_SCHEMA,
11205+ oid: oid::VIEW_MZ_SHOW_REPLACEMENTS_OID,
11206+ desc: RelationDesc::builder()
11207+ .with_column("id", SqlScalarType::String.nullable(false))
11208+ .with_column("name", SqlScalarType::String.nullable(false))
11209+ .with_column("replaces", SqlScalarType::String.nullable(false))
11210+ .with_column("cluster", SqlScalarType::String.nullable(false))
11211+ .with_column("schema_id", SqlScalarType::String.nullable(false))
11212+ .with_column("cluster_id", SqlScalarType::String.nullable(false))
11213+ .with_column("comment", SqlScalarType::String.nullable(false))
11214+ .finish(),
11215+ column_comments: BTreeMap::new(),
11216+ sql: "
11217+ WITH comments AS (
11218+ SELECT id, comment
11219+ FROM mz_internal.mz_comments
11220+ WHERE object_type = 'replacement' AND object_sub_id IS NULL
11221+ )
11222+ SELECT
11223+ mviews.id as id,
11224+ mviews.name,
11225+ mviews.replaces,
11226+ clusters.name AS cluster,
11227+ schema_id,
11228+ cluster_id,
11229+ COALESCE(comments.comment, '') as comment
11230+ FROM
11231+ mz_internal.mz_replacement_materialized_views AS mviews
11232+ JOIN mz_catalog.mz_clusters AS clusters ON clusters.id = mviews.cluster_id
11233+ LEFT JOIN comments ON mviews.id = comments.id",
11234+ access: vec![PUBLIC_SELECT],
11235+ });
11236+
1120211237pub static MZ_SHOW_INDEXES: LazyLock<BuiltinView> = LazyLock::new(|| BuiltinView {
1120311238 name: "mz_show_indexes",
1120411239 schema: MZ_INTERNAL_SCHEMA,
@@ -12811,6 +12846,15 @@ ON mz_internal.mz_show_materialized_views (schema_id)",
1281112846 is_retained_metrics_object: false,
1281212847};
1281312848
12849+ pub const MZ_SHOW_REPLACEMENTS_IND: BuiltinIndex = BuiltinIndex {
12850+ name: "mz_show_replacements_ind",
12851+ schema: MZ_INTERNAL_SCHEMA,
12852+ oid: oid::INDEX_MZ_SHOW_REPLACEMENTS_IND_OID,
12853+ sql: "IN CLUSTER mz_catalog_server
12854+ ON mz_internal.mz_show_replacements (schema_id)",
12855+ is_retained_metrics_object: false,
12856+ };
12857+
1281412858pub const MZ_SHOW_SINKS_IND: BuiltinIndex = BuiltinIndex {
1281512859 name: "mz_show_sinks_ind",
1281612860 schema: MZ_INTERNAL_SCHEMA,
@@ -13978,6 +14022,7 @@ pub static BUILTINS_STATIC: LazyLock<Vec<Builtin<NameReference>>> = LazyLock::ne
1397814022 Builtin::View(&MZ_SHOW_SOURCES),
1397914023 Builtin::View(&MZ_SHOW_SINKS),
1398014024 Builtin::View(&MZ_SHOW_MATERIALIZED_VIEWS),
14025+ Builtin::View(&MZ_SHOW_REPLACEMENTS),
1398114026 Builtin::View(&MZ_SHOW_INDEXES),
1398214027 Builtin::View(&MZ_SHOW_CONTINUAL_TASKS),
1398314028 Builtin::View(&MZ_CLUSTER_REPLICA_HISTORY),
@@ -14128,6 +14173,7 @@ pub static BUILTINS_STATIC: LazyLock<Vec<Builtin<NameReference>>> = LazyLock::ne
1412814173 Builtin::Index(&MZ_SHOW_SOURCES_IND),
1412914174 Builtin::Index(&MZ_SHOW_VIEWS_IND),
1413014175 Builtin::Index(&MZ_SHOW_MATERIALIZED_VIEWS_IND),
14176+ Builtin::Index(&MZ_SHOW_REPLACEMENTS_IND),
1413114177 Builtin::Index(&MZ_SHOW_SINKS_IND),
1413214178 Builtin::Index(&MZ_SHOW_TYPES_IND),
1413314179 Builtin::Index(&MZ_SHOW_ALL_OBJECTS_IND),
0 commit comments