Skip to content

fix(ui): use new quantity field across components - #1

Closed
cmatzenbach wants to merge 5 commits into
johanpel:stats-quantitiesfrom
cmatzenbach:fe-quantity-formatting
Closed

fix(ui): use new quantity field across components#1
cmatzenbach wants to merge 5 commits into
johanpel:stats-quantitiesfrom
cmatzenbach:fe-quantity-formatting

Conversation

@cmatzenbach

@cmatzenbach cmatzenbach commented Jul 29, 2026

Copy link
Copy Markdown

Description

The stats-quantities branch introduces a quantity field on OperatorStatistic and rescales duration values from nanoseconds to seconds on the backend before sending them to the UI. Without corresponding FE changes, all _ns duration statistics display incorrect values - the existing inferFieldFormatter treated the value as nanoseconds, but it's now receiving seconds, causing values to be off.

This wires the quantity field through to every display site so values are formatted using the QuantitySpec from QueryBundle.quantity_specs rather than name-based heuristics.

Display sites updated:

  • DAGNodeInfoPanel - the operator detail panel now formats stats via formatStatWithQuantity, receiving quantity_specs as a new prop from QueryPlan
  • QueryPlanNode - the node color label uses formatStatWithQuantity
  • DAGLegend - continuous color legends use formatQuantity directly when a resolved QuantitySpec is available
  • PivotedStatTable - formatStatValue/formatNumericStat accept an optional QuantitySpec; the operator table computes a statQuantitySpecs map from quantity_specs and threads it through to the table cells

Related Issues

Relates to PR rapidsai#471

Testing

  • Click a node in the DAG - confirm duration stats in the info panel show human-readable values (e.g. "1.23 ms", "450 µs") rather than near-zero numbers
  • Color nodes by a duration stat - confirm the node label and legend min/max are formatted correctly
  • Open the operator stats pivot table - confirm duration columns display correctly in both raw and aggregated modes
  • Confirm byte stats (e.g. spill_bytes) still format correctly - these were already working and should be unaffected

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.

1 participant