Skip to content

Commit

Permalink
WEE
Browse files Browse the repository at this point in the history
  • Loading branch information
SangJunBak committed Dec 5, 2023
1 parent 13b271c commit 8c861e0
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/catalog/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5547,6 +5547,18 @@ JOIN root_times r USING (id)",
sensitivity: DataSensitivity::Public,
};

pub const MZ_ACTIVITY_LOG_AVERAGE_ROW_SIZE: BuiltinView = BuiltinView {
name: "mz_activity_log_average_row_size",
schema: MZ_INTERNAL_SCHEMA,
column_defs: None,
sql: "
SELECT
avg(mz_row_size(mal.*)) as average_row_size
FROM mz_internal.mz_activity_log as mal;
",
sensitivity: DataSensitivity::Public,
};

pub const MZ_SHOW_DATABASES_IND: BuiltinIndex = BuiltinIndex {
name: "mz_show_databases_ind",
schema: MZ_INTERNAL_SCHEMA,
Expand Down Expand Up @@ -5851,6 +5863,15 @@ ON mz_internal.mz_frontiers (object_id)",
is_retained_metrics_object: false,
};

pub const MZ_ACTIVITY_LOG_AVERAGE_ROW_SIZE_IND: BuiltinIndex = BuiltinIndex {
name: "mz_activity_log_average_row_size_ind",
schema: MZ_INTERNAL_SCHEMA,
sql: "CREATE INDEX mz_activity_log_average_row_size_ind
IN CLUSTER default
ON mz_internal.mz_activity_log_average_row_size (average_row_size)",
is_retained_metrics_object: false,
};

pub const MZ_SYSTEM_ROLE: BuiltinRole = BuiltinRole {
id: MZ_SYSTEM_ROLE_ID,
name: SYSTEM_USER_NAME,
Expand Down Expand Up @@ -6229,6 +6250,7 @@ pub static BUILTINS_STATIC: Lazy<Vec<Builtin<NameReference>>> = Lazy::new(|| {
Builtin::View(&MZ_MATERIALIZATION_LAG),
Builtin::View(&MZ_COMPUTE_ERROR_COUNTS_PER_WORKER),
Builtin::View(&MZ_COMPUTE_ERROR_COUNTS),
Builtin::View(&MZ_ACTIVITY_LOG_AVERAGE_ROW_SIZE),
Builtin::Source(&MZ_CLUSTER_REPLICA_FRONTIERS),
Builtin::Source(&MZ_CLUSTER_REPLICA_HEARTBEATS),
Builtin::Index(&MZ_SHOW_DATABASES_IND),
Expand Down Expand Up @@ -6269,6 +6291,7 @@ pub static BUILTINS_STATIC: Lazy<Vec<Builtin<NameReference>>> = Lazy::new(|| {
Builtin::Index(&MZ_COMPUTE_DEPENDENCIES_IND),
Builtin::Index(&MZ_OBJECT_TRANSITIVE_DEPENDENCIES_IND),
Builtin::Index(&MZ_FRONTIERS_IND),
Builtin::Index(&MZ_ACTIVITY_LOG_AVERAGE_ROW_SIZE_IND),
]);

builtins
Expand Down

0 comments on commit 8c861e0

Please sign in to comment.