From 382d7d4aaec1cdb58042576401711c20312cc468 Mon Sep 17 00:00:00 2001 From: Sergii Dymchenko Date: Mon, 30 Dec 2024 21:24:49 -0800 Subject: [PATCH] Convert torchbench_userbenchmark_query_metrics to CH (#6122) --- .../query.sql | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/torchci/clickhouse_queries/torchbench_userbenchmark_query_metrics/query.sql b/torchci/clickhouse_queries/torchbench_userbenchmark_query_metrics/query.sql index 563bf23a6d..dc16da9b02 100644 --- a/torchci/clickhouse_queries/torchbench_userbenchmark_query_metrics/query.sql +++ b/torchci/clickhouse_queries/torchbench_userbenchmark_query_metrics/query.sql @@ -1,4 +1,10 @@ --- !!! Query is not converted to CH syntax yet. Delete this line when it gets converted -SELECT * FROM torchbench."torchbench-userbenchmark" - WHERE name = :userbenchmark - AND REGEXP_LIKE("torchbench-userbenchmark".environ.pytorch_git_version, :commit); \ No newline at end of file +SELECT + * +FROM + benchmark.torchbench_userbenchmark +WHERE + name = {userbenchmark: String } + AND match( + JSONExtractString(environ, 'pytorch_git_version') as pytorch_git_version, + {commit: String } + )