发布

  • [OPIK-6727] [BE] feat: emit dominant project for multi-project orphan experiments (#6923)

    frostbyte_neo 发布于 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)) with ifNull(..., 0)
    so the SQL never returns NULL into the primitive long distinctProjectCount
    field on ExperimentProjectMapping. Today CH's default join_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 (if fallback for
    project_id, ifNull for 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

    下载附件