Skip to content

Commit 1f7e778

Browse files
committed
test(fuse): cover distributed hash partition writes
1 parent 12a6773 commit 1f7e778

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

tests/sqllogictests/suites/base/09_fuse_engine/09_0054_partition_by.test

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -384,21 +384,23 @@ statement ok
384384
CREATE TABLE hash_partitioned_none(id INT) PARTITION BY (bucket(16, id)) ROW_PER_BLOCK=1000 BLOCK_PER_SEGMENT=1000
385385

386386
statement ok
387-
INSERT INTO hash_partitioned SELECT number::BIGINT FROM numbers(40000)
387+
INSERT INTO hash_partitioned SELECT number::BIGINT FROM numbers(9600)
388388

389389
statement ok
390-
INSERT INTO hash_partitioned_none SELECT number::BIGINT FROM numbers(40000)
390+
INSERT INTO hash_partitioned_none SELECT number::BIGINT FROM numbers(9600)
391391

392392
query I
393393
SELECT count(*) FROM hash_partitioned
394394
----
395-
40000
395+
9600
396396

397-
# Both tables receive identical interleaved bucket data. Hash write layout should
398-
# stay close to the intrinsic three blocks per bucket and produce fewer blocks
399-
# than the normal block-local partition split. Allow partition-boundary tails.
397+
# The base suite also runs against a three-node cluster. Each bucket has about
398+
# 600 rows, below ROW_PER_BLOCK. GlobalShuffle routes every bucket to one writer
399+
# before the node-local full sort, keeping the total below 32 after allowing
400+
# sort block-boundary tails. Without the shuffle, all three writers retain tails
401+
# for all 16 buckets. The none table also verifies the block-local baseline.
400402
query II
401-
SELECT to_int64(h.block_count <= 64), to_int64(h.block_count < n.block_count)
403+
SELECT to_int64(h.block_count <= 32), to_int64(h.block_count < n.block_count)
402404
FROM fuse_snapshot('db_09_0054', 'hash_partitioned') AS h
403405
CROSS JOIN fuse_snapshot('db_09_0054', 'hash_partitioned_none') AS n
404406
LIMIT 1

0 commit comments

Comments
 (0)