From fb3d54ff655994913dcd6ccaa523c7035fefb7ca Mon Sep 17 00:00:00 2001 From: Mehdi DARDANI Date: Mon, 20 Oct 2025 11:30:48 +0200 Subject: [PATCH 1/3] fix(iceberg): update month calculation to use ChronoUnit for improved accuracy --- .../org/apache/beam/sdk/io/iceberg/RecordWriterManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/RecordWriterManager.java b/sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/RecordWriterManager.java index b1e8a825601d..6ddd943eb198 100644 --- a/sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/RecordWriterManager.java +++ b/sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/RecordWriterManager.java @@ -228,8 +228,9 @@ static String getPartitionDataPath( String transformName = Preconditions.checkArgumentNotNull(partitionFieldMap.get(name)).transform().toString(); if (Transforms.month().toString().equals(transformName)) { - int month = YearMonth.parse(value).getMonthValue(); - value = String.valueOf(month); + long months = + ChronoUnit.MONTHS.between(EPOCH, YearMonth.parse(value).atDay(1).atStartOfDay()); + value = String.valueOf(months); } else if (Transforms.hour().toString().equals(transformName)) { long hour = ChronoUnit.HOURS.between(EPOCH, LocalDateTime.parse(value, HOUR_FORMATTER)); value = String.valueOf(hour); From ef0056dcc1ff631069d32923de429fba308665b9 Mon Sep 17 00:00:00 2001 From: Mehdi DARDANI Date: Thu, 13 Nov 2025 09:48:10 +0100 Subject: [PATCH 2/3] fix(tests): update trigger file comment and modification count for IO Iceberg Integration Tests --- .github/trigger_files/IO_Iceberg_Integration_Tests.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/trigger_files/IO_Iceberg_Integration_Tests.json b/.github/trigger_files/IO_Iceberg_Integration_Tests.json index 7ab7bcd9a9c6..bce5f6ec78b4 100644 --- a/.github/trigger_files/IO_Iceberg_Integration_Tests.json +++ b/.github/trigger_files/IO_Iceberg_Integration_Tests.json @@ -1,4 +1,4 @@ { - "comment": "Modify this file in a trivial way to cause this test suite to run.", - "modification": 2 + "comment": "Modify this file to trigger tests run for IO Iceberg Integration Tests", + "modification": 3 } From 6df714564826f3e5e4322d26eb0075c64f21857e Mon Sep 17 00:00:00 2001 From: Ahmed Abualsaud <65791736+ahmedabu98@users.noreply.github.com> Date: Thu, 13 Nov 2025 13:13:34 +0300 Subject: [PATCH 3/3] Update IO_Iceberg_Integration_Tests.json --- .github/trigger_files/IO_Iceberg_Integration_Tests.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/trigger_files/IO_Iceberg_Integration_Tests.json b/.github/trigger_files/IO_Iceberg_Integration_Tests.json index 37dd25bf9029..34a6e02150e7 100644 --- a/.github/trigger_files/IO_Iceberg_Integration_Tests.json +++ b/.github/trigger_files/IO_Iceberg_Integration_Tests.json @@ -1,4 +1,4 @@ { "comment": "Modify this file in a trivial way to cause this test suite to run.", - "modification": 3 + "modification": 4 }