-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix predicate failure for negative offset value on _timestamp column #13170
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for you contribution! Please submit CLA if you haven't sent it https://github.com/trinodb/cla.
Could you please add a test to TestKafkaIntegrationPushDown
?
Also, I would recommend improving the commit title - we can't understand what's the issue from "small bug".
@@ -129,11 +129,15 @@ public KafkaFilteringResult getKafkaFilterResult( | |||
if (offsetTimestampRanged.isPresent()) { | |||
try (KafkaConsumer<byte[], byte[]> kafkaConsumer = consumerFactory.create(session)) { | |||
Optional<Range> finalOffsetTimestampRanged = offsetTimestampRanged; | |||
partitionBeginOffsets = overridePartitionBeginOffsets(partitionBeginOffsets, | |||
partition -> findOffsetsForTimestampGreaterOrEqual(kafkaConsumer, partition, finalOffsetTimestampRanged.get().getBegin())); | |||
if (offsetTimestampRanged.get().getBegin() >= 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add some tests to check if it works as expected ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I added some test cases in TestKafkaIntegrationPushDown.
|
016441c
to
3738407
Compare
Hello, I have signed CLA and got it.Please review again @ebyhr @Praveen2112 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you fix the commit title likes below sentence?
Fix predicate failure for negative offset value on _timestamp column
plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaFilterManager.java
Outdated
Show resolved
Hide resolved
plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaIntegrationPushDown.java
Outdated
Show resolved
Hide resolved
715f013
to
f4d2bad
Compare
OK, I changed to |
f4d2bad
to
cac3dc4
Compare
plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaIntegrationPushDown.java
Outdated
Show resolved
Hide resolved
plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/KafkaFilterManager.java
Show resolved
Hide resolved
5b24559
to
7c5648e
Compare
plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaIntegrationPushDown.java
Outdated
Show resolved
Hide resolved
plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaIntegrationPushDown.java
Outdated
Show resolved
Hide resolved
plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaIntegrationPushDown.java
Outdated
Show resolved
Hide resolved
plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaIntegrationPushDown.java
Outdated
Show resolved
Hide resolved
plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaIntegrationPushDown.java
Show resolved
Hide resolved
@harris233 Please rebase instead of merge to follow upstream. |
65e7124
to
2d32f22
Compare
OK, I rebased it. |
2d32f22
to
d775527
Compare
0305df2
to
d6fb5d5
Compare
Merged, thanks! |
Description
Related issues, pull requests, and links
Fixes #13167
Documentation
(x) No documentation is needed.
Release notes
(x) Release notes entries required with the following suggested text:
Issue:#13167