From e9daa05d8fbe1b344415b035c80fb2217378c6c6 Mon Sep 17 00:00:00 2001 From: Pablo Marcos Date: Wed, 27 Nov 2024 17:41:13 +0000 Subject: [PATCH] Fix test --- .../03202_system_load_primary_key.reference | 28 +++++++++---------- .../03202_system_load_primary_key.sql | 16 +++++------ 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/tests/queries/0_stateless/03202_system_load_primary_key.reference b/tests/queries/0_stateless/03202_system_load_primary_key.reference index 84c18d66a7d..6c932801e74 100644 --- a/tests/queries/0_stateless/03202_system_load_primary_key.reference +++ b/tests/queries/0_stateless/03202_system_load_primary_key.reference @@ -1,14 +1,14 @@ -tab1 0 0 -tab2 0 0 -tab1 0 0 -tab2 0 0 -tab1 10000000 10000000 -- Expected non-zero memory after loading primary keys -tab2 10000000 10000000 -tab1 0 0 -tab2 0 0 -1 a -2 b -3 c -1 x -2 y -3 z +tab1 0 0 +tab2 0 0 +tab1 1 1 +tab2 1 1 +tab1 1 1 +tab2 1 1 +tab1 1 1 +tab2 0 0 +1 a +2 b +3 c +1 x +2 y +3 z diff --git a/tests/queries/0_stateless/03202_system_load_primary_key.sql b/tests/queries/0_stateless/03202_system_load_primary_key.sql index 0946531a54c..35bdd8eeaff 100644 --- a/tests/queries/0_stateless/03202_system_load_primary_key.sql +++ b/tests/queries/0_stateless/03202_system_load_primary_key.sql @@ -16,8 +16,8 @@ INSERT INTO tab2 VALUES (1, 'x'), (2, 'y'), (3, 'z'); -- Check primary key memory before loading (this checks if it's not loaded yet) for both tables SELECT table, - round(primary_key_bytes_in_memory, -7), - round(primary_key_bytes_in_memory_allocated, -7) + primary_key_bytes_in_memory == 0, + primary_key_bytes_in_memory_allocated == 0 FROM system.parts WHERE database = currentDatabase() @@ -31,8 +31,8 @@ SYSTEM LOAD PRIMARY KEY; -- Ensure .reference file has non-zero values here to reflect expected primary key loading SELECT table, - round(primary_key_bytes_in_memory, -7), - round(primary_key_bytes_in_memory_allocated, -7) + primary_key_bytes_in_memory > 0, + primary_key_bytes_in_memory_allocated > 0 FROM system.parts WHERE database = currentDatabase() @@ -45,8 +45,8 @@ SYSTEM UNLOAD PRIMARY KEY; -- Verify primary key memory after unloading for both tables SELECT table, - round(primary_key_bytes_in_memory, -7), - round(primary_key_bytes_in_memory_allocated, -7) + primary_key_bytes_in_memory == 0, + primary_key_bytes_in_memory_allocated == 0 FROM system.parts WHERE database = currentDatabase() @@ -59,8 +59,8 @@ SYSTEM LOAD PRIMARY KEY tab1; -- Verify that only one table's primary key is loaded SELECT table, - round(primary_key_bytes_in_memory, -7), - round(primary_key_bytes_in_memory_allocated, -7) + primary_key_bytes_in_memory > 0, + primary_key_bytes_in_memory_allocated > 0 FROM system.parts WHERE database = currentDatabase()