Skip to content

Commit 130c99e

Browse files
committed
fix: remove erroneous [1] index from MAP tag access
DuckDB MAP['key'] returns the value directly, not a list. The [1] was indexing into the string (e.g. 'run1'[1] = 'r'). Caught by test_map_format_extracts_run_id regression test.
1 parent f8613d1 commit 130c99e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

bin/benchmark_report.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,12 @@ def build_database(runs: list[dict], cur_path: str | None = None) -> duckdb.Duck
224224
is_map_format = "resource_tags" in cur_cols and "resource_tags_user_unique_run_id" not in cur_cols
225225

226226
if is_map_format:
227-
run_id_expr = "COALESCE(resource_tags['user_unique_run_id'][1], resource_tags['user_nf_unique_run_id'][1])"
228-
process_expr = "resource_tags['user_pipeline_process'][1]"
229-
hash_expr = "LEFT(resource_tags['user_task_hash'][1], 8)"
227+
run_id_expr = "COALESCE(resource_tags['user_unique_run_id'], resource_tags['user_nf_unique_run_id'])"
228+
process_expr = "resource_tags['user_pipeline_process']"
229+
hash_expr = "LEFT(resource_tags['user_task_hash'], 8)"
230230
where_clause = (
231-
"resource_tags['user_unique_run_id'][1] IS NOT NULL "
232-
"OR resource_tags['user_nf_unique_run_id'][1] IS NOT NULL"
231+
"resource_tags['user_unique_run_id'] IS NOT NULL "
232+
"OR resource_tags['user_nf_unique_run_id'] IS NOT NULL"
233233
)
234234
else:
235235
# Old flattened-column format

0 commit comments

Comments
 (0)