Skip to content

Commit 04a6147

Browse files
rustyconoverclaude
andcommitted
fixtures: split_many honours its splits argument
It returned max(splits, 1000), so more_splits_than_threads.test paid for 1000 splits (~2000 HTTP round trips per query) whatever it asked for. Every other SDK's twin honours the argument and uses 1000 only for splits <= 0; this one now does the same. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 3201c87 commit 04a6147

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎vgi/_test_fixtures/table/splits.py‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
shape that silently truncates a scan if a reader treats an empty split as EOS.
1919
* ``split_skewed(n)`` — one split ~100x the others, so greedy claiming can be
2020
told apart from static assignment.
21-
* ``split_many(n, splits := 1000)`` — far more splits than reader threads, which
22-
forces sequential re-init on a reused connection.
21+
* ``split_many(n, splits)`` — far more splits than reader threads (pass them), which
22+
forces sequential re-init on a reused connection. ``splits <= 0`` means 1000.
2323
* ``split_echo_filters(n)`` — reports the pushdown it saw *per split*, so a
2424
pushdown regression is visible without inferring it from row counts.
2525
"""
@@ -322,7 +322,9 @@ class Meta:
322322

323323
@classmethod
324324
def _split_count(cls, params: BindParams[SplitSequenceArgs]) -> int:
325-
return max(params.args.splits, 1000)
325+
# Honour the caller's count, as every other SDK's twin does; a floor here
326+
# made a test that asks for 64 splits pay for 1000 HTTP round trips.
327+
return params.args.splits if params.args.splits > 0 else 1000
326328

327329

328330
@dataclass(frozen=True)

0 commit comments

Comments
 (0)