-
[OPIK-6727] [BE] feat: emit dominant project for multi-project orphan experiments (#6923)
发布于
2026-05-29 16:33:32 +00:00 -
[OPIK-6727] [BE] feat: emit dominant project for multi-project orphan experiments
-
fix(experiment-migration): null-guard distinct_project_count against future join_use_nulls=1
Defensive: wrap
any(length(per_experiment_ranked.ranked))withifNull(..., 0)
so the SQL never returns NULL into the primitivelong distinctProjectCount
field onExperimentProjectMapping. Today CH's defaultjoin_use_nulls=0
makes the unmatched LEFT JOIN cell an empty array (length 0), and the row
mapper works fine; if that setting ever flips to 1, the unmatched cell becomes
NULL,length(NULL)is NULL, and the Java unbox throws NPE. The other two
outer aggregates already carry equivalent guards (iffallback for
project_id,ifNullfor project_breakdown); this brings distinct_project_count
into symmetry. Zero runtime cost.Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com
Co-authored-by: Claude Opus 4.7 noreply@anthropic.com
下载附件
-