Repository navigation
fix: Correct FilledAreaPlot x-value validation across groups - #6894
Conversation
Automated Reviewer SuggestionsBased on the
|
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 393 | 0.24 | 25,644/30,735/30,735 us | 🔴 +19.7% / 🔴 +100.1% |
| 🔴 | bs=100 sw=10 sl=64 | 789 | 0.482 | 125,189/159,743/159,743 us | 🔴 +6.6% / 🔴 +46.4% |
| ⚪ | bs=1000 sw=10 sl=64 | 902 | 0.551 | 1,112,988/1,152,143/1,152,143 us | ⚪ within ±5% / 🔴 +11.0% |
Baseline details
Latest main 7e4a9b4 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 393 tuples/sec | 437 tuples/sec | 754.55 tuples/sec | -10.1% | -47.9% |
| bs=10 sw=10 sl=64 | MB/s | 0.24 MB/s | 0.267 MB/s | 0.461 MB/s | -10.1% | -47.9% |
| bs=10 sw=10 sl=64 | p50 | 25,644 us | 21,428 us | 12,816 us | +19.7% | +100.1% |
| bs=10 sw=10 sl=64 | p95 | 30,735 us | 34,536 us | 16,594 us | -11.0% | +85.2% |
| bs=10 sw=10 sl=64 | p99 | 30,735 us | 34,536 us | 19,806 us | -11.0% | +55.2% |
| bs=100 sw=10 sl=64 | throughput | 789 tuples/sec | 806 tuples/sec | 969.38 tuples/sec | -2.1% | -18.6% |
| bs=100 sw=10 sl=64 | MB/s | 0.482 MB/s | 0.492 MB/s | 0.592 MB/s | -2.0% | -18.5% |
| bs=100 sw=10 sl=64 | p50 | 125,189 us | 121,121 us | 103,584 us | +3.4% | +20.9% |
| bs=100 sw=10 sl=64 | p95 | 159,743 us | 149,888 us | 109,097 us | +6.6% | +46.4% |
| bs=100 sw=10 sl=64 | p99 | 159,743 us | 149,888 us | 117,304 us | +6.6% | +36.2% |
| bs=1000 sw=10 sl=64 | throughput | 902 tuples/sec | 908 tuples/sec | 1,004 tuples/sec | -0.7% | -10.1% |
| bs=1000 sw=10 sl=64 | MB/s | 0.551 MB/s | 0.554 MB/s | 0.613 MB/s | -0.5% | -10.1% |
| bs=1000 sw=10 sl=64 | p50 | 1,112,988 us | 1,107,485 us | 1,002,357 us | +0.5% | +11.0% |
| bs=1000 sw=10 sl=64 | p95 | 1,152,143 us | 1,146,636 us | 1,046,463 us | +0.5% | +10.1% |
| bs=1000 sw=10 sl=64 | p99 | 1,152,143 us | 1,146,636 us | 1,073,661 us | +0.5% | +7.3% |
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,509.34,200,128000,393,0.240,25643.96,30734.66,30734.66
1,100,10,64,20,2533.79,2000,1280000,789,0.482,125188.64,159742.68,159742.68
2,1000,10,64,20,22160.85,20000,12800000,902,0.551,1112988.13,1152142.76,1152142.76
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6894 +/- ##
============================================
- Coverage 77.97% 76.96% -1.02%
- Complexity 3661 3706 +45
============================================
Files 1161 1174 +13
Lines 46059 47004 +945
Branches 5105 5214 +109
============================================
+ Hits 35915 36176 +261
- Misses 8521 9187 +666
- Partials 1623 1641 +18
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
LGTM. cc @xuang7 for backport review |
|
let's do the backport separately |
|
LGTM. Looks ready to merge whenever a committer has a moment. |
|
Dequeue was a merge-queue timeout (30-min check-response limit), not a failing check — the run sat ~25 min waiting for a runner. All build jobs passed; just needs re-queuing. |
…6998) ### What changes were proposed in this PR? Backport of #6894 to `release/v1.2`, cherry-picked from bb7af8d. The cherry-pick applied cleanly. Follows the Direct Backport Push convention; opened as a PR (rather than a direct push) per a backport-coverage audit. ### Any related issues, documentation, discussions? Backport of #6894. Originally linked #6728. ### How was this PR tested? Release-branch CI runs on this PR. Cherry-pick applied cleanly onto `release/v1.2`; no manual conflict resolution was needed. ### Was this PR authored or co-authored using generative AI tooling? Yes — backport prepared with Claude Code (mechanical cherry-pick; the change itself is #6894 by its original author). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Martin Vu <[email protected]>
…e a true 5% (apache#7149) ### What changes were proposed in this PR? **Background (apache#7146).** The Filled Area Plot operator draws stacked area lines, one per Line Group, which only makes sense when the groups share an x axis. `FilledAreaPlotOpDesc.performTableCheck()` therefore emits a Python guard that suppresses the chart when too many groups have x-value sets disjoint from the others; the comment above it documents the rule as "more than 5 percents of the groups have disjoint sets of x attributes". When the guard fires, the run still completes successfully — the operator just yields fallback HTML instead of the chart, with no warning anywhere. **The defect.** The guard computes the threshold as `(len(grouped) // 100) * 5`. The integer division floors first, so the tolerance is 0 for any chart with fewer than 100 line groups, and a single disjoint group suppresses the whole chart — e.g. a 40-group chart with 1 disjoint group (2.5%, well under the documented 5%) was suppressed. The two expressions only agree when the group count is an exact multiple of 100. This has been latent since the operator was introduced in apache#2086: an `X_values` typo in the same block kept the accumulated x-value set from ever growing, so the guard fired constantly for an unrelated reason; apache#6894 fixed that typo, which made the tolerance arithmetic the deciding factor for the first time. **The change.** Swap the operand order to `(len(grouped) * 5) // 100`, plus four behavior-neutral cleanups to the same emitted block: the per-group `set(...unique())` is hoisted into one local (was built twice per group), `== None` becomes `is None`, the always-true `elif not ...` becomes `else`, and the loop `break`s once the error is set. Below 20 groups both expressions yield 0, which is correct (1/19 = 5.3% exceeds 5%), so the fix only changes behavior at 20+ line groups. ### Any related issues, documentation, discussions? Fixes apache#7146. Adjacent to apache#6728 / apache#6894, which fixed an `X_values` typo in the same block but did not touch the tolerance arithmetic. ### How was this PR tested? `performTableCheck()` previously had no test coverage. This PR adds 10 tests to `FilledAreaPlotOpDescSpec` (TDD: written red first, green after the fix): - 9 assertions on the generated guard, including the tolerance expression, a single `.unique()` per iteration, `break` placement after the error assignment, and that user-provided column names are never emitted verbatim. - 1 runtime test that executes the generated Python (real pandas groupby + plotly rendering; only the `pytexera` import seam is stubbed) across 9 boundary datasets: 19 groups/1 disjoint still suppressed (5.3% > 5%), 20/1 and 40/2 at exactly 5.0% render, 40/1 renders (the reported bug), 40/3 suppressed, plus all-disjoint, single-group, empty-table, and missing-column cases. It cancels (not fails) when no python with pandas+plotly is available. Full spec: 20/20 passing. Red-check verified: reverting only the tolerance line makes the runtime test fail on the 40/1 and exactly-5% cases. Checks from [CONTRIBUTING.md] all pass locally: `sbt WorkflowOperator/scalafmtCheck` and `WorkflowOperator/Test/scalafmtCheck` (no violations), `sbt "WorkflowOperator/scalafixAll --check"` (clean), and the full `sbt WorkflowOperator/test` module suite — 1967 succeeded, 0 failed, 2 pending. ### Was this PR authored or co-authored using generative AI tooling? Co-authored by: Claude Code (Claude Fable 5) --------- Co-authored-by: Claude Fable 5 <[email protected]>
What changes were proposed in this PR?
Fixed the FilledAreaPlot validation logic for grouped data with shared X-values.
Previously, the validation incorrectly handled X-value comparisons between groups, causing valid charts to be rejected. The logic was updated so that X-values are tracked across groups correctly when checking whether groups share compatible X attributes.
Before:

After:

Any related issues, documentation, discussions?
Fixes #6728
How was this PR tested?
Tested by running Texera locally and executing a FilledAreaPlot workflow with grouped data.
CSV File:
filled_area_test.csv
Verified:
Was this PR authored or co-authored using generative AI tooling?
Generated-by: ChatGPT (GPT-5.5-mini)