Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
9cefd2e
Speed up searching of partitions within the in memory data source state
pirvtech Sep 26, 2025
143f095
Narrowing search space for an interval when an exact match is not found
pirvtech Oct 6, 2025
d38750e
Implemented an optimized data structure to find intervals encompassin…
pirvtech Oct 8, 2025
ecb9f82
Added rebalancing
pirvtech Oct 9, 2025
6789646
Added imbalance threshold to control when to trigger rebalancing
pirvtech Oct 10, 2025
b55c9e2
Added rebalance and data content checks
pirvtech Oct 11, 2025
54b0a4e
Updated doc
pirvtech Oct 13, 2025
982b238
Cleaned up some comments and names
pirvtech Oct 13, 2025
99d6628
Overwriting value if there is an exact interval match with add
pirvtech Oct 13, 2025
ac4b8e0
Addressing review comments
pirvtech Oct 14, 2025
42cafff
Added feature flag to control use of interval tree for matching segments
pirvtech Oct 14, 2025
de9138b
Using a single interval field for storing the min to max range for a …
pirvtech Oct 20, 2025
ee4dcab
Generified the match function, so it can be used with different types…
pirvtech Oct 21, 2025
236c0e0
Addressed review comments
pirvtech Oct 22, 2025
e63e660
Removed commented code
pirvtech Oct 24, 2025
0badf8c
Added addition documentation
pirvtech Oct 24, 2025
e076a74
Updated doc
pirvtech Oct 24, 2025
af17043
Removed commented code
pirvtech Oct 24, 2025
ef483c4
Cast IntervalTree as a NavigableMap so it can become a drop in replac…
pramodin Nov 7, 2025
b3c6791
Using both start and end dates of the interval during comparision whe…
pirvtech Nov 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,34 @@ public int compare(Interval lhs, Interval rhs)
}
};

private static final Comparator<Interval> INTERVAL_BY_START = new Comparator<>()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we just reuse the existing comparators INTERVAL_BY_START_THEN_END and INTERVAL_BY_END_THEN_START?

{
private final DateTimeComparator dateTimeComp = DateTimeComparator.getInstance();

@Override
public int compare(Interval lhs, Interval rhs)
{
if (lhs.getChronology().equals(rhs.getChronology())) {
return Long.compare(lhs.getStartMillis(), rhs.getStartMillis());
}
return dateTimeComp.compare(lhs.getStart(), rhs.getStart());
}
};

private static final Comparator<Interval> INTERVAL_BY_END = new Comparator<>()
{
private final DateTimeComparator dateTimeComp = DateTimeComparator.getInstance();

@Override
public int compare(Interval lhs, Interval rhs)
{
if (lhs.getChronology().equals(rhs.getChronology())) {
return Long.compare(lhs.getEndMillis(), rhs.getEndMillis());
}
return dateTimeComp.compare(lhs.getEnd(), rhs.getEnd());
}
};

@Deprecated
public static Comparator<Interval> intervals()
{
Expand All @@ -135,4 +163,15 @@ public static Comparator<Interval> intervalsByEndThenStart()
return INTERVAL_BY_END_THEN_START;
}

public static Comparator<Interval> intervalsByStart()
{
return INTERVAL_BY_START;
}

public static Comparator<Interval> intervalsByEnd()
{
return INTERVAL_BY_END;
}


}
Loading
Loading