Skip to content

Secondary-time#7

Closed
rdettai-sk wants to merge 1 commit intosekoia-20251208from
secondary-time
Closed

Secondary-time#7
rdettai-sk wants to merge 1 commit intosekoia-20251208from
secondary-time

Conversation

@rdettai-sk
Copy link
Collaborator

Description

Describe the proposed changes made in this PR.

How was this PR tested?

Describe how you tested this PR.

fn merge_secondary_time_range_if_exists(
splits: &[SplitMetadata],
) -> Option<RangeInclusive<DateTime>> {
if splits
Copy link
Collaborator

Choose a reason for hiding this comment

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

Couldn't we merge the two iteration to improve performances ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We can, but I would replace the whole thing with a for loop because it already feels like the limit of what is digest in terms of iterators 😄. This is really not on the critical path as it happens only once for every merge and the list size is typically 10.

@rdettai-sk rdettai-sk force-pushed the secondary-time branch 4 times, most recently from 874527c to c49ec16 Compare December 16, 2025 13:57
Comment on lines +878 to +880
/// Retains only splits with a secondary time range end that is defined and
/// *less than or equal to* the provided value. If the secondary time range
/// end is not defined, falls back to the primary.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@Darkheir I changed this to fallback on the primary if the secondary is not defined. It is tested. Can you just proofread it? (given that it has the potential to wipe the whole data 😄 )

Copy link
Collaborator

Choose a reason for hiding this comment

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

Seems good to me. No need to fallback for the other cases ?

@rdettai-sk
Copy link
Collaborator Author

built into sekoia-20251218 https://github.com/SekoiaLab/platform/actions/runs/20342851868

@rdettai-sk rdettai-sk closed this Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants