feat(characterization): surface unmapped custom-SQL results instead of dropping them - #135
Open
watilde wants to merge 3 commits into
Open
feat(characterization): surface unmapped custom-SQL results instead of dropping them#135watilde wants to merge 3 commits into
watilde wants to merge 3 commits into
Conversation
…f dropping them Custom feature analyses can emit result rows that fit neither the prevalence nor the distribution shape (e.g. categorical or bespoke columns). The result mapper silently discarded these, so a spec-conformant custom SQL could produce output that never appeared in the UI. Collect such rows (valid analysisId+covariateId but unclassifiable, or missing cohortId) into a new `unmapped` bucket and render them verbatim in a new RawResultTable — columns derived dynamically from whatever the rows carry, with a "Custom SQL" badge driven by the (previously unused) faType field. Malformed id-less rows are still dropped. The existing prevalence/distribution paths are untouched. First, smallest slice of a larger plan to let custom SQL unlock richer Characterization visualisations; the contract here is simply "never make custom output invisible". Signed-off-by: Daijiro Wachi <daijiro.wachi@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #135 +/- ##
===========================================
+ Coverage 94.27% 94.30% +0.02%
===========================================
Files 448 449 +1
Lines 96572 96822 +250
Branches 8555 8591 +36
===========================================
+ Hits 91047 91310 +263
+ Misses 5525 5512 -13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…-data slot Add tests for the unmapped/custom-SQL path — PerAnalysisView grouping, analysisId fallback, analysis/domain filters and empty state; every RawResultTable formatValue branch; and the mapper's "classifiable but no cohortId" case. Remove RawResultTable's unreachable no-data slot (it is only ever rendered for non-empty groups). Signed-off-by: Daijiro Wachi <daijiro.wachi@gmail.com>
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.
Custom feature analyses can emit result rows that fit neither the prevalence nor the distribution shape (e.g. categorical or bespoke columns). The result mapper silently discarded these, so a spec-conformant custom SQL could produce output that never appeared in the UI.
Collect such rows (valid analysisId+covariateId but unclassifiable, or missing cohortId) into a new
unmappedbucket and render them verbatim in a new RawResultTable — columns derived dynamically from whatever the rows carry, with a "Custom SQL" badge driven by the (previously unused) faType field. Malformed id-less rows are still dropped. The existing prevalence/distribution paths are untouched.First, smallest slice of a larger plan to let custom SQL unlock richer Characterization visualisations; the contract here is simply "never make custom output invisible".