apache / apache/druid

VersionedIntervalTimeline uses different comparators for the same version type

Open
#8,320 0 comments 0 reactions 0 assignees View on GitHub
Bug
Dominant language
Java
Stars
14.1k
Forks
3.8k
Avg merge
2d 58m
Merged PRs (30d)
233

Description

In most places, `String` is used as the version type for `VersionedIntervalTimeline`. However, the users of this class use two different comparators in different places. For example, in `AppenderatorImpl`, `String.CASE_INSENSITIVE_ORDER` is used as the comparator while `Comparator.naturalOrder()` is used as the comparator in `VersionedIntervalTimeline.forSegments()`. I think perhaps this might not be very critical but it would be better to use the same comparator.

Contributor guide

Open the contributing guide

Research direction

Start by inspecting VersionedIntervalTimeline.forSegments() and the comparator passed by AppenderatorImpl, then search for other VersionedIntervalTimeline call sites using String versions. Determine which ordering is intended and verify the consistent comparator behavior with the relevant existing tests or a focused regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.