summaryrefslogtreecommitdiffstats
path: root/.github/scripts/analytics
diff options
context:
space:
mode:
authorОлег <[email protected]>2026-02-18 22:18:17 +0300
committerGitHub <[email protected]>2026-02-18 20:18:17 +0100
commit2eb501cf80c7213f6d3633b845367f7dbccd29fa (patch)
treef1c5b327ec3f1ae55db991e6edc4397c1d7ec3d3 /.github/scripts/analytics
parentd14d37027be17a988d9e408443032e915391ca05 (diff)
Remove CROSS JOIN for parfomance olap data mart (#34454)
Diffstat (limited to '.github/scripts/analytics')
-rw-r--r--.github/scripts/analytics/data_mart_queries/perfomance_olap_mart.sql19
1 files changed, 11 insertions, 8 deletions
diff --git a/.github/scripts/analytics/data_mart_queries/perfomance_olap_mart.sql b/.github/scripts/analytics/data_mart_queries/perfomance_olap_mart.sql
index 9e589a8b50e..25962835727 100644
--- a/.github/scripts/analytics/data_mart_queries/perfomance_olap_mart.sql
+++ b/.github/scripts/analytics/data_mart_queries/perfomance_olap_mart.sql
@@ -2,14 +2,15 @@ $start_timestamp = (CurrentUtcDate() - 30 * Interval("P1D"));
$all_suites = (
SELECT
- Suite, Test
+ Suite, Test, Db
FROM (
SELECT
+ Db,
Suite,
ListSort(AGG_LIST_DISTINCT(Test)) AS Tests
FROM `perfomance/olap/tests_results`
WHERE Timestamp >= $start_timestamp
- GROUP BY Suite
+ GROUP BY Suite, Db
)
FLATTEN LIST BY Tests AS Test
);
@@ -17,11 +18,14 @@ $all_suites = (
$launch_times = (
SELECT
launch_times_raw.*,
- all_suites.*,
+ all_suites.Suite as Suite,
+ all_suites.Test as Test,
COALESCE(SubString(CAST(launch_times_raw.Version AS String), 0U, RFIND(CAST(launch_times_raw.Version AS String), '.')), 'unknown') As Branch,
COALESCE(SubString(CAST(launch_times_raw.CiVersion AS String), 0U, RFIND(CAST(launch_times_raw.CiVersion AS String), '.')), 'unknown') As CiBranch,
COALESCE(SubString(CAST(launch_times_raw.TestToolsVersion AS String), 0U, RFIND(CAST(launch_times_raw.TestToolsVersion AS String), '.')), 'unknown') As TestToolsBranch,
- FROM (
+ FROM
+ $all_suites AS all_suites
+ LEFT JOIN (
SELECT
Db,
Version,
@@ -35,9 +39,8 @@ $launch_times = (
GROUP BY
Db,
JSON_VALUE(Info, "$.cluster.version") AS Version,
- JSON_VALUE(Info, "$.ci_launch_id") AS LunchId
- ) AS launch_times_raw
- CROSS JOIN $all_suites AS all_suites
+ COALESCE(JSON_VALUE(tests_results.Info, "$.ci_launch_id"), CAST(RunId AS String)) AS LunchId
+ ) AS launch_times_raw ON all_suites.Db == launch_times_raw.Db
);
$all_tests_raw =
@@ -47,7 +50,7 @@ $all_tests_raw =
JSON_VALUE(tests_results.Info, "$.cluster.version") AS Version_n,
JSON_VALUE(Info, "$.ci_version") AS CiVersion_n,
JSON_VALUE(Info, "$.test_tools_version") AS TestToolsVersion_n,
- JSON_VALUE(tests_results.Info, "$.ci_launch_id") AS LunchId_n,
+ COALESCE(JSON_VALUE(tests_results.Info, "$.ci_launch_id"), CAST(RunId AS String)) AS LunchId_n,
CAST(JSON_VALUE(Stats, '$.DiffsCount') AS INT) AS diff_response,
IF(Success > 0, CAST(CAST(JSON_VALUE(Stats, '$.CompilationAvg') AS Double) AS Uint64)) AS CompilationAvg,
IF(Success > 0, MeanDuration / 1000) AS YdbSumMeans,