From a4ce2fee008d1ed210ea273cdc14e07263edd3b2 Mon Sep 17 00:00:00 2001 From: Moritz Hoffmann Date: Wed, 24 May 2023 09:12:55 -0400 Subject: [PATCH] Fix tests Signed-off-by: Moritz Hoffmann --- src/adapter/src/catalog/builtin.rs | 5 ++++- test/sqllogictest/cluster.slt | 4 ++-- test/testdrive/introspection-sources.td | 10 +++++----- test/testdrive/logging.td | 4 ++-- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/adapter/src/catalog/builtin.rs b/src/adapter/src/catalog/builtin.rs index 7b29c0da51da1..8cc9325f70f34 100644 --- a/src/adapter/src/catalog/builtin.rs +++ b/src/adapter/src/catalog/builtin.rs @@ -2980,7 +2980,10 @@ pub const MZ_DATAFLOW_ARRANGEMENT_SIZES: BuiltinView = BuiltinView { mdod.dataflow_id AS id, mo.name, COALESCE(sum(mas.records), 0) AS records, - COALESCE(sum(mas.batches), 0) AS batches + COALESCE(sum(mas.batches), 0) AS batches, + COALESCE(sum(mas.size), 0) AS size, + COALESCE(sum(mas.capacity), 0) AS capacity, + COALESCE(sum(mas.allocations), 0) AS allocations FROM mz_internal.mz_dataflow_operators AS mdo LEFT JOIN mz_internal.mz_arrangement_sizes AS mas ON mdo.id = mas.operator_id diff --git a/test/sqllogictest/cluster.slt b/test/sqllogictest/cluster.slt index c5a16050914c6..127371fa09e13 100644 --- a/test/sqllogictest/cluster.slt +++ b/test/sqllogictest/cluster.slt @@ -161,10 +161,10 @@ bar mz_active_peeks_per_worker mz_active_peeks_per_worker_u6_primary_idx 1 i bar mz_active_peeks_per_worker mz_active_peeks_per_worker_u6_primary_idx 2 worker_id NULL false bar mz_arrangement_batches_raw mz_arrangement_batches_raw_u6_primary_idx 1 operator_id NULL false bar mz_arrangement_batches_raw mz_arrangement_batches_raw_u6_primary_idx 2 worker_id NULL false -bar mz_arrangement_heap_capacity_raw mz_arrangement_heap_capacity_raw_u6_primary_idx 1 operator_id NULL false -bar mz_arrangement_heap_capacity_raw mz_arrangement_heap_capacity_raw_u6_primary_idx 2 worker_id NULL false bar mz_arrangement_heap_allocations_raw mz_arrangement_heap_allocations_raw_u6_primary_idx 1 operator_id NULL false bar mz_arrangement_heap_allocations_raw mz_arrangement_heap_allocations_raw_u6_primary_idx 2 worker_id NULL false +bar mz_arrangement_heap_capacity_raw mz_arrangement_heap_capacity_raw_u6_primary_idx 1 operator_id NULL false +bar mz_arrangement_heap_capacity_raw mz_arrangement_heap_capacity_raw_u6_primary_idx 2 worker_id NULL false bar mz_arrangement_heap_size_raw mz_arrangement_heap_size_raw_u6_primary_idx 1 operator_id NULL false bar mz_arrangement_heap_size_raw mz_arrangement_heap_size_raw_u6_primary_idx 2 worker_id NULL false bar mz_arrangement_records_raw mz_arrangement_records_raw_u6_primary_idx 1 operator_id NULL false diff --git a/test/testdrive/introspection-sources.td b/test/testdrive/introspection-sources.td index 01d5fd38885bb..21057c6c2cfba 100644 --- a/test/testdrive/introspection-sources.td +++ b/test/testdrive/introspection-sources.td @@ -282,9 +282,9 @@ mv1_primary_idx mv1 > CREATE DEFAULT INDEX ii_arr ON vv_arr -> SELECT records >= 300 FROM mz_internal.mz_dataflow_arrangement_sizes WHERE name='ii_arr' OR name='mv_arr' -true -true +> SELECT records >= 300, size >= 300*96, capacity >= 300*96 FROM mz_internal.mz_dataflow_arrangement_sizes WHERE name='ii_arr' OR name='mv_arr' +true true true +true true true # Test that non-arranging dataflows show up in `mz_dataflow_arrangement_sizes` @@ -292,5 +292,5 @@ true > CREATE DEFAULT INDEX ii_empty ON t3 -> SELECT records, batches FROM mz_internal.mz_dataflow_arrangement_sizes WHERE name='ii_empty' -0 0 +> SELECT records, batches, size, capacity, allocations FROM mz_internal.mz_dataflow_arrangement_sizes WHERE name='ii_empty' +0 0 0 0 0 diff --git a/test/testdrive/logging.td b/test/testdrive/logging.td index 4dda40dfecf4a..4cd247165cf1e 100644 --- a/test/testdrive/logging.td +++ b/test/testdrive/logging.td @@ -170,9 +170,9 @@ SID operator_id 1 uint8 SID worker_id 2 uint8 SID records 3 bigint SID batches 4 bigint -SID capacity 6 bigint -SID count 7 bigint SID size 5 bigint +SID capacity 6 bigint +SID allocations 7 bigint > SELECT mz_columns.id, mz_columns.name, position, type FROM mz_views JOIN mz_columns USING (id)