Skip to content

Commit 5acac8d

Browse files
authored
chore(trino): Backport Kafka offset handling to 477 (#1373)
* chore(trino): Backport Kafka offset handling to 477 Backport trinodb/trino#26789 to Trino 477 * changelog
1 parent b4e09a0 commit 5acac8d

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ All notable changes to this project will be documented in this file.
1919
- testing-tools: refactoring: Split image into multiple images, remove unnecessary components and switch to UBI as base image ([#1354]).
2020
- hive: fixed 4.0.1 shaded hive-metastore-opa-authorizer jar by relocating dependencies ([#1356]).
2121
- testing-tools: fix: add kubectl and openssl ([#1367]).
22+
- trino: Backport Kafka offset handling to 477 ([#1373]).
2223
- ubi: Bumped ubi9 and ubi10 hashes ([#1386]).
2324

2425
### Removed
@@ -35,6 +36,7 @@ All notable changes to this project will be documented in this file.
3536
[#1358]: https://github.com/stackabletech/docker-images/pull/1358
3637
[#1366]: https://github.com/stackabletech/docker-images/pull/1366
3738
[#1367]: https://github.com/stackabletech/docker-images/pull/1367
39+
[#1373]: https://github.com/stackabletech/docker-images/pull/1373
3840
[#1386]: https://github.com/stackabletech/docker-images/pull/1386
3941

4042
## [25.11.0] - 2025-11-07
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
From a46ead926108b561ca6fa6b193dd38db5a8cb125 Mon Sep 17 00:00:00 2001
2+
From: Sebastian Bernauer <sebastian.bernauer@stackable.tech>
3+
Date: Wed, 7 Jan 2026 13:30:17 +0100
4+
Subject: Fix findOffsetsForTimestampGreaterOrEqual
5+
6+
Back-port of https://github.com/trinodb/trino/pull/26789
7+
8+
Co-authored-by: Mateusz "Serafin" Gajewski <github@wendigo.pl>
9+
---
10+
.../main/java/io/trino/plugin/kafka/KafkaFilterManager.java | 3 +--
11+
1 file changed, 1 insertion(+), 2 deletions(-)
12+
13+
diff --git a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaFilterManager.java b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaFilterManager.java
14+
index 5c853d9011..25d3c83301 100644
15+
--- a/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaFilterManager.java
16+
+++ b/plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaFilterManager.java
17+
@@ -182,8 +182,7 @@ public class KafkaFilterManager
18+
{
19+
Map<TopicPartition, OffsetAndTimestamp> topicPartitionOffsetAndTimestamps = kafkaConsumer.offsetsForTimes(timestamps);
20+
return topicPartitionOffsetAndTimestamps.entrySet().stream()
21+
- .collect(toMap(Map.Entry::getKey, entry -> Optional.of(entry.getValue())
22+
- .map(OffsetAndTimestamp::offset)));
23+
+ .collect(toMap(Map.Entry::getKey, entry -> Optional.ofNullable(entry.getValue()).map(OffsetAndTimestamp::offset)));
24+
}
25+
26+
private static Map<TopicPartition, Long> overridePartitionBeginOffsets(Map<TopicPartition, Long> partitionBeginOffsets,

0 commit comments

Comments
 (0)