Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Moritz Hoffmann <[email protected]>
  • Loading branch information
antiguru committed May 24, 2023
1 parent d904bcc commit a4ce2fe
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
5 changes: 4 additions & 1 deletion src/adapter/src/catalog/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/sqllogictest/cluster.slt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions test/testdrive/introspection-sources.td
Original file line number Diff line number Diff line change
Expand Up @@ -282,15 +282,15 @@ 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`

> CREATE TABLE t3 (c int)

> 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
4 changes: 2 additions & 2 deletions test/testdrive/logging.td
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a4ce2fe

Please sign in to comment.