Skip to content
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

Identify timelines uniquely by name (ignore type) #9097

Merged
merged 34 commits into from
Feb 21, 2025
Merged

Conversation

emilk
Copy link
Member

@emilk emilk commented Feb 20, 2025

Related

What

We used to uniquely identify a time column by its name and type (temporal or sequence).

This PR changes this to only use the name.

Using the same name but different types has always been undefined behavior, and a bad idea. If you've been doing this, it is likely that your old code already produced "surprising" results. After this PR, you should at least get a clear warning printed in the terminal.

What changed

  • Store
  • Caches
  • Queries
  • Dataframe column selectors

What happens when you mix different time types on the same timeline?

Both the SDK and the viewer will log a warning, and the last used TimeType will be used in the UI.

TODO:

  • Detect switching the type of time column in the SDK, and log a warning.
  • Full check
  • Migration guide entry
  • Update docs where relevant
  • Dataplatform PR

Future PR

  • TimePoint

Copy link

github-actions bot commented Feb 20, 2025

Web viewer built successfully. If applicable, you should also test it:

  • I have tested the web viewer
Result Commit Link Manifest
161b5ba https://rerun.io/viewer/pr/9097 +nightly +main

Note: This comment is updated whenever you push a commit.

@emilk emilk force-pushed the emilk/time-name-key branch from e8fbb06 to 3fb8ac0 Compare February 20, 2025 16:17
@emilk emilk changed the title Use only timeline _name_ as its key Identify timelines uniquely by name (ignore type) Feb 20, 2025
@emilk emilk force-pushed the emilk/time-name-key branch from 3fb8ac0 to 6f8fcec Compare February 20, 2025 19:35
@emilk emilk marked this pull request as ready for review February 20, 2025 20:00
@emilk
Copy link
Member Author

emilk commented Feb 21, 2025

@rerun-bot full-check

Copy link

@emilk
Copy link
Member Author

emilk commented Feb 21, 2025

@rerun-bot full-check

Copy link

Started a full build: https://github.com/rerun-io/rerun/actions/runs/13452501275

@teh-cmc teh-cmc self-requested a review February 21, 2025 08:19
Copy link

github-actions bot commented Feb 21, 2025

Latest documentation preview deployed successfully.

Result Commit Link
161b5ba https://landing-o0ub0ioqi-rerun.vercel.app/docs

Note: This comment is updated whenever you push a commit.

Copy link
Member

@teh-cmc teh-cmc left a comment

Choose a reason for hiding this comment

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

🎉

I kinda lost my sense of self after file 60 or something, it's fine

Comment on lines +201 to +202
"{:?} ({})",
self.time_range(),
Copy link
Member

Choose a reason for hiding this comment

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

Are these changes gonna make debug dumps harder to read? 😞 I don't remember what the raw debug formatting of a TimeRange looks like...

Copy link
Member Author

Choose a reason for hiding this comment

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

Unfortunately yes :(

@teh-cmc
Copy link
Member

teh-cmc commented Feb 21, 2025

This probably needs a sibling PR on dataplatform, right?

@emilk emilk merged commit fec8480 into main Feb 21, 2025
36 of 37 checks passed
@emilk emilk deleted the emilk/time-name-key branch February 21, 2025 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants