feat(paired-t-test): migrate paired_ttest chart to v1 chart data API - #41721
Conversation
Adds a buildQuery mirroring the legacy PairedTTestViz.query_obj (a timeseries query grouped by the group columns, sort metric appended with ordering under order_desc) and ports the pandas pivot_table reshape from the backend get_data into a transformData helper: one series per (metric, group tuple) with missing timestamps padded with null. Legacy pre-shaped payloads pass through untouched. No DB migration needed: viz_type is unchanged and legacy granularity_sqla/time_range form data flows through extractExtras. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Bito Automatic Review Skipped - Branch Excluded |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## remove-legacy-viz-pipeline #41721 +/- ##
==============================================================
+ Coverage 64.62% 64.63% +0.01%
==============================================================
Files 2684 2686 +2
Lines 148431 148491 +60
Branches 34249 34264 +15
==============================================================
+ Hits 95930 95984 +54
- Misses 50739 50745 +6
Partials 1762 1762
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:
|
JSON-key string sorting misordered numeric groups (10 before 2), which changes row order and the default control group. Tuples now compare element-wise with numeric awareness, matching the pandas pivot column ordering. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…41721) Co-authored-by: Claude Code <noreply@anthropic.com>
…41721) Co-authored-by: Claude Code <noreply@anthropic.com>
…41721) Co-authored-by: Claude Code <noreply@anthropic.com>
…41721) Co-authored-by: Claude Code <noreply@anthropic.com>
…41721) Co-authored-by: Claude Code <noreply@anthropic.com>
…41721) Co-authored-by: Claude Code <noreply@anthropic.com>
…41721) Co-authored-by: Claude Code <noreply@anthropic.com>
…41721) Co-authored-by: Claude Code <noreply@anthropic.com>
…41721) Co-authored-by: Claude Code <noreply@anthropic.com>
…41721) Co-authored-by: Claude Code <noreply@anthropic.com>
…41721) Co-authored-by: Claude Code <noreply@anthropic.com>
…41721) Co-authored-by: Claude Code <noreply@anthropic.com>
…41721) Co-authored-by: Claude Code <noreply@anthropic.com>
…41721) Co-authored-by: Claude Code <noreply@anthropic.com>
…41721) Co-authored-by: Claude Code <noreply@anthropic.com>
…41721) Co-authored-by: Claude Code <noreply@anthropic.com>
…41721) Co-authored-by: Claude Code <noreply@anthropic.com>
SUMMARY
Tier 2 of #41714 (targets
remove-legacy-viz-pipeline): migrate the Paired t-test Table (paired_ttest) offexplore_jsononto/api/v1/chart/data.buildQuery.tsmirroring the legacyPairedTTestViz.query_obj: timeseries query (is_timeseries: true) grouped by the group columns, sort metric appended to the select list,orderbyunderorder_desc, residualorder_by_colsignored.pivot_tablereshape fromget_datais ported to atransformDatahelper: one series per (metric, group tuple),{x, y}points on the union of timestamps with missing combinations padded withnull, group order matching the sorted pandas pivot columns,Allgroup when ungrouped.useLegacyApi: trueremoved (and the "Legacy" tag dropped).viz_typeunchanged; legacygranularity_sqla/time_rangehandled byextractExtras(covered by test).BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
No visual change — same renderer, same data shape, different endpoint.
TESTING INSTRUCTIONS
npm run test -- plugins/legacy-plugin-chart-paired-t-test— 7 Jest tests (timeseries query shape, sort-metric append, orderby ownership, null padding, multi-metric/multi-group nesting, timestamp ordering, All group).POST /api/v1/chart/data; p-values/lift values identical.ADDITIONAL INFORMATION
🤖 Generated with Claude Code