Skip to content

Conversation

@altimin
Copy link
Collaborator

@altimin altimin commented Nov 2, 2025

Allow the user to change the type of the column explicitly by
casting the column to one of the types in PerfettoSQL.

Each column can be cast to any primitive PerfettoSQL type (int, double, string, boolean, timestamp, duration) and
select id types (slice id, utid, upid). If a column already has a given type, it can't be cast to it again. If the column
is already as cast column, a further cast would apply to the original column (so cast(cast(foo)) simplifies to
cast(foo)).

Known limitations

  • Only a small number of id types are supported for now (slice id, utid, upid).
  • Cast relies on sqlite cast, which is too permissive for casts from string to int / double.
Screenshot 2025-11-02 at 16 00 37 Screenshot 2025-11-02 at 16 01 53

@altimin altimin requested a review from a team as a code owner November 2, 2025 15:53
Allow the user to change the type of the column explicitly by
casting the column to one of the types in PerfettoSQL.
@altimin altimin force-pushed the dev/altimin/cast_column branch from 3f27650 to cc357a3 Compare November 2, 2025 15:57
@altimin altimin requested a review from stevegolton November 2, 2025 16:06
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