-
[OPIK-7226] fix: move project_id idempotency guard into subquery for CH 26.3
发布于
2026-07-16 14:45:47 +00:00 The experiment/optimization project-migration BATCH_SET_PROJECT_ID queries
usedSELECT * REPLACE(:project_id AS project_id) FROM (...) WHERE project_id = ''.
On ClickHouse 26.3 the analyzer resolves the outerWHERE project_id = ''to
the REPLACE alias (the new value) instead of the source column, so the guard
matches nothing and the INSERT writes zero rows — breaking the migration.Move the
project_id = ''guard inside the subquery so it filters on the true
source column before REPLACE. Verified correct on both CH 25.8 and 26.3.Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
下载附件