From 4721cf42eae65f7726d46676324090f25db653ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Grom?= Date: Wed, 8 Jul 2026 14:41:46 +0100 Subject: [PATCH] fix: correct openedAt epoch corruption in PR merge MV (IN-1190) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gašper Grom --- .../pipes/pull_request_analysis_baseline_merge_MV.pipe | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/libs/tinybird/pipes/pull_request_analysis_baseline_merge_MV.pipe b/services/libs/tinybird/pipes/pull_request_analysis_baseline_merge_MV.pipe index f8d33f6fa2..e0f1b9b1be 100644 --- a/services/libs/tinybird/pipes/pull_request_analysis_baseline_merge_MV.pipe +++ b/services/libs/tinybird/pipes/pull_request_analysis_baseline_merge_MV.pipe @@ -254,7 +254,9 @@ SQL > SELECT if(existing.id != '', existing.id, new.id) as id, if(existing.sourceId != '', existing.sourceId, new.prSourceId) as sourceId, - COALESCE(existing.openedAt, new.openedAt) as openedAt, + if( + existing.openedAt != toDateTime(0), existing.openedAt, new.openedAt + ) as openedAt, if(existing.segmentId != '', existing.segmentId, new.segmentId) as segmentId, if(existing.channel != '', existing.channel, new.channel) as channel, if(existing.memberId != '', existing.memberId, new.memberId) as memberId,