Repository navigation
fix(eap): Apply virtual columns to coalesced reads of their name - #8739
Merged
Merged
Conversation
sentry-conventions 0.35.0 adds sentry.device.class as an alias of device.class, so reads of device.class now coalesce over both keys. _apply_virtual_columns rewrites only the operands keyed by to_column_name, so the alias operand leaked raw stored values (or NULL when neither key is set) past the value map. Sentry's device.class virtual column then stopped mapping missing values to Unknown. Collapse coalesced reads of a virtual column's name back to a single-key read before applying the mapping, and re-land the 0.35.0 bump reverted in f820920. Co-Authored-By: Elio Di Nino <[email protected]>
MeredithAnya
approved these changes
Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re-lands the sentry-conventions 0.35.0 bump (#8737, reverted in f8209206b) together with the fix for the regression it caused.
What broke
0.35.0 adds
sentry.device.classas an alias ofdevice.class(getsentry/sentry-conventions#804), so snuba now readsdevice.classas a coalesced value:Sentry sends
device.classas a virtual column mapped fromsentry.device.class._apply_virtual_columnstransforms expressions bottom-up and only rewrites reads keyed byto_column_name. So the value map landed inside one branch of themultiIf, and the fallback branch returned the rawsentry.device.classvalue, or NULL when neither key is set. Spans without a device class stopped resolving toUnknownin sentry's spans queries, which broke sentry's backend tests and blocked backend deploys.Fix
A virtual column replaces every read of its name. Before applying the value map,
_apply_virtual_columnsnow collapses coalesced reads ofto_column_nameback to a single-key read. This covers the SELECT/group-by form (attributes_string[...]), the filter form (arrayElement), and the OR'dhas(mapKeys(...))existence guard. It matches the exact expressions built bycoalesced_attribute_names,first_present_value, andkey_existence_conditions. Coalescing of the backingfrom_column_nameis unchanged.Rollout note
Merging puts 0.35.0 back into the
snuba:nightlyimage that sentry's backend CI uses, so the sentry test job here needs to be green before this merges.via @ElioDiNino.
--
View Session [Sentry]