Skip to content

Commit bc74778

Browse files
feat: wire geo native into vx-bench
Signed-off-by: Nemo Yu <zyu379@wisc.edu>
1 parent 9693a7d commit bc74778

3 files changed

Lines changed: 49 additions & 0 deletions

File tree

bench-orchestrator/bench_orchestrator/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class Format(Enum):
3535
PARQUET = "parquet"
3636
VORTEX = "vortex"
3737
VORTEX_COMPACT = "vortex-compact"
38+
VORTEX_NATIVE = "vortex-native"
3839
DUCKDB = "duckdb"
3940
LANCE = "lance"
4041

@@ -68,6 +69,7 @@ class Benchmark(Enum):
6869
Format.PARQUET,
6970
Format.VORTEX,
7071
Format.VORTEX_COMPACT,
72+
Format.VORTEX_NATIVE,
7173
Format.DUCKDB,
7274
],
7375
Engine.LANCE: [Format.LANCE],

bench-orchestrator/tests/test_config.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,23 @@ def test_parse_formats_json_accepts_ci_format_arrays() -> None:
2626
assert formats == [Format.PARQUET, Format.VORTEX, Format.DUCKDB]
2727

2828

29+
def test_parse_formats_json_accepts_vortex_native() -> None:
30+
formats = parse_formats_json('["parquet","vortex","vortex-native"]')
31+
32+
assert formats == [Format.PARQUET, Format.VORTEX, Format.VORTEX_NATIVE]
33+
34+
35+
def test_resolve_axis_targets_offers_vortex_native_on_duckdb_only() -> None:
36+
# vortex-native is a DuckDB-only lane; the DataFusion axis is dropped as unsupported.
37+
targets, warnings = resolve_axis_targets(
38+
[Engine.DATAFUSION, Engine.DUCKDB],
39+
[Format.VORTEX_NATIVE],
40+
)
41+
42+
assert targets == [BenchmarkTarget(engine=Engine.DUCKDB, format=Format.VORTEX_NATIVE)]
43+
assert warnings == ["Format vortex-native is not supported by engine datafusion"]
44+
45+
2946
def test_resolve_axis_targets_filters_unsupported_combinations() -> None:
3047
targets, warnings = resolve_axis_targets(
3148
[Engine.DATAFUSION, Engine.DUCKDB],
@@ -55,6 +72,23 @@ def test_resolve_axis_targets_skips_engines_a_benchmark_cannot_run() -> None:
5572
assert warnings == ["Benchmark spatialbench does not support engine datafusion"]
5673

5774

75+
def test_resolve_axis_targets_expands_spatialbench_three_lanes() -> None:
76+
# The single-command three-lane comparison: parquet, WKB vortex, and native-geometry vortex, all
77+
# on DuckDB.
78+
targets, warnings = resolve_axis_targets(
79+
[Engine.DUCKDB],
80+
[Format.PARQUET, Format.VORTEX, Format.VORTEX_NATIVE],
81+
Benchmark.SPATIALBENCH,
82+
)
83+
84+
assert targets == [
85+
BenchmarkTarget(engine=Engine.DUCKDB, format=Format.PARQUET),
86+
BenchmarkTarget(engine=Engine.DUCKDB, format=Format.VORTEX),
87+
BenchmarkTarget(engine=Engine.DUCKDB, format=Format.VORTEX_NATIVE),
88+
]
89+
assert warnings == []
90+
91+
5892
def test_validate_targets_rejects_engine_a_benchmark_cannot_run() -> None:
5993
errors = validate_targets(
6094
[BenchmarkTarget(engine=Engine.DATAFUSION, format=Format.PARQUET)],

bench-orchestrator/tests/test_executor.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,19 @@ def test_build_command_adds_duckdb_cleanup_flag() -> None:
3333
assert "scale-factor=1.0" in cmd
3434

3535

36+
def test_build_command_serializes_vortex_native_format() -> None:
37+
executor = BenchmarkExecutor(Path("/tmp/duckdb-bench"), Engine.DUCKDB)
38+
39+
cmd = executor.build_command(
40+
benchmark=Benchmark.SPATIALBENCH,
41+
formats=[Format.PARQUET, Format.VORTEX, Format.VORTEX_NATIVE],
42+
iterations=1,
43+
options={"scale-factor": "1.0"},
44+
)
45+
46+
assert "parquet,vortex,vortex-native" in cmd
47+
48+
3649
def test_build_command_omits_formats_for_lance_backend() -> None:
3750
executor = BenchmarkExecutor(Path("/tmp/lance-bench"), Engine.LANCE)
3851

0 commit comments

Comments
 (0)