Skip to content

feat(workflow-operator): volcano plot hover column - #9042

Open
eugenegujing wants to merge 6 commits into
apache:mainfrom
eugenegujing:feat/volcano-plot-hover-column
Open

eugenegujing wants to merge 6 commits into
apache:mainfrom
eugenegujing:feat/volcano-plot-hover-column

Conversation

@eugenegujing

@eugenegujing eugenegujing commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

The Volcano Plot uses hover_name=table.columns[0], so the tooltip label is whatever column comes first in the input. That is fine for a DESeq2 table starting with gene and useless for one starting with a composite id or a number, and there is no way to change it. This PR copies Scatter Plot's Hover column property over, one column only.

Hover column Result
empty or whitespace-only (default) hover_name=table.columns[0], unchanged for saved workflows
set, present in the input hover_name=<that column>
set, missing from the input the operator's error page Missing hover column in table., like the existing check for the two required columns (Scatter Plot lets plotly raise a ValueError here)

Since #8504 merged, the operator also exports a standalone script through generateStandaloneCode(), which had hover_name=table.columns[0] hard-coded. This PR mirrors the property there: the hover column goes in as an escaped Python literal, and a set column that the input lacks adds one more elif to the script's column checks, writing the same error page. Whether the field counts as empty is decided by one helper for both paths, so the exported figure and the engine's cannot disagree.

Independent of the PRs for the label fix (#9037) and the significance thresholds (#9039); all three touch neighbouring lines of VolcanoPlotOpDesc.scala, so whichever lands second needs a small rebase.

Figures below are the operator's generated Python from main and from this branch (Hover column = gene), run on the 430-gene example workflow from the issue whose first column is transcript|gene|chr|strand; the same point is hovered in both.

Before After (Hover column = gene)
hover-before-first-column hover-after-gene

Any related issues, documentation, discussions?

Closes #9038

PR #8504 (merged) added the generateStandaloneCode() export path with the same hover_name=table.columns[0]; the mirroring described above is the follow-up it needed.

How was this PR tested?

New tests in VolcanoPlotOpDescSpec, written before the source change:

  • empty or whitespace-only field keeps hover_name=table.columns[0] and emits no hover check
  • a set field emits the decoded column as hover_name plus the presence check, and no table.columns[0]
  • a column name with quotes and non-ASCII text reaches the code only as a decode site
  • a workflow JSON saved before this change generates byte-for-byte the same code as a default-constructed operator
  • generateStandaloneCode: an empty field keeps hover_name=table.columns[0] and adds no check; a set field is emitted as a literal plus an exact five-line elif branch between the required-column check and the drawing branch; a name with quotes, non-ASCII text or a backslash comes out escaped rather than decoded; whitespace-only equals empty
sbt -Dsbt.server.forcestart=true "WorkflowOperator/testOnly *VolcanoPlotOpDescSpec"
# Tests: succeeded 15, failed 0, canceled 0, ignored 0, pending 1   (the pending one is pre-existing)

sbt -Dsbt.server.forcestart=true "WorkflowOperator/scalafmtAll" "WorkflowOperator/Test/scalafmtAll"
sbt -Dsbt.server.forcestart=true "WorkflowOperator/scalafixAll --check"
# success

Smoke run outside Texera (pytexera stubbed, pandas + plotly 5.24.1) on the 430-gene mock table: defaults hover-label the first point as ENST00000000000|GENE_0000|chr2|+; Hover column = gene gives GENE_0000; Hover column = no_such_column yields <h1>Volcano Plot failed</h1><p>Missing hover column in table.</p>. The exported script for the default and the gene configuration parses with ast.parse.

Was this PR authored or co-authored using generative AI tooling?

Yes. Generated-by: Claude Code (claude-fable-5-1). Co-authored with Claude; the author reviewed the change before submission.

Add an optional Hover column property, as on Scatter Plot, used as the hover label of each point.
An empty or blank field keeps the first input column as before; a set column missing from the input yields the operator's error page.
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @aglinxinyuan, @Yicong-Huang
    You can notify them by mentioning @aglinxinyuan, @Yicong-Huang in a comment.

@codecov-commenter

codecov-commenter commented Oct 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.72%. Comparing base (d6c9050) to head (bbc08a2).
⚠️ Report is 39 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9042      +/-   ##
============================================
- Coverage     91.85%   91.72%   -0.14%     
- Complexity     5020     5033      +13     
============================================
  Files          1279     1269      -10     
  Lines         56192    55778     -414     
  Branches       7320     7202     -118     
============================================
- Hits          51615    51161     -454     
- Misses         2741     2778      +37     
- Partials       1836     1839       +3     
Flag Coverage Δ *Carryforward flag
access-control-service 77.44% <ø> (ø)
agent-service 99.53% <ø> (ø) Carriedforward from 6fa064b
amber 85.80% <100.00%> (-0.10%) ⬇️
computing-unit-managing-service 64.05% <ø> (ø)
config-service 87.73% <ø> (+0.11%) ⬆️
file-service 82.31% <ø> (+0.01%) ⬆️
frontend 96.46% <ø> (-0.08%) ⬇️ Carriedforward from 6fa064b
notebook-migration-service 83.77% <ø> (ø)
pyamber 98.54% <ø> (+0.07%) ⬆️ Carriedforward from 6fa064b
workflow-compiling-service 78.30% <ø> (+0.34%) ⬆️

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

🟢 0 better · 🔴 9 worse · ⚪ 6 noise (<±5%) · 0 without baseline

Compared against main d6c9050 benchmarked on this same runner, so the delta is largely free of cross-runner hardware noise. The "7d avg" column still reflects the gh-pages dashboard. Treat <±5% as noise unless repeated.

Dashboard · Run

config throughput MB/s latency max Δ latest / 7d
🔴 bs=10 sw=10 sl=64 428 0.261 22,456/32,344/32,344 us 🔴 +29.9% / 🔴 +122.7%
🔴 bs=100 sw=10 sl=64 964 0.588 100,071/128,656/128,656 us 🔴 +11.4% / 🔴 +33.7%
🔴 bs=1000 sw=10 sl=64 1,125 0.687 877,562/1,085,247/1,085,247 us 🔴 +16.7% / 🔴 +19.9%
Baseline details

Latest main d6c9050 from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 428 tuples/sec 512 tuples/sec 901.09 tuples/sec -16.4% -52.5%
bs=10 sw=10 sl=64 MB/s 0.261 MB/s 0.313 MB/s 0.55 MB/s -16.6% -52.5%
bs=10 sw=10 sl=64 p50 22,456 us 20,175 us 11,350 us +11.3% +97.9%
bs=10 sw=10 sl=64 p95 32,344 us 24,897 us 14,525 us +29.9% +122.7%
bs=10 sw=10 sl=64 p99 32,344 us 24,897 us 17,637 us +29.9% +83.4%
bs=100 sw=10 sl=64 throughput 964 tuples/sec 1,005 tuples/sec 1,205 tuples/sec -4.1% -20.0%
bs=100 sw=10 sl=64 MB/s 0.588 MB/s 0.613 MB/s 0.735 MB/s -4.1% -20.0%
bs=100 sw=10 sl=64 p50 100,071 us 98,408 us 88,882 us +1.7% +12.6%
bs=100 sw=10 sl=64 p95 128,656 us 115,516 us 96,205 us +11.4% +33.7%
bs=100 sw=10 sl=64 p99 128,656 us 115,516 us 120,754 us +11.4% +6.5%
bs=1000 sw=10 sl=64 throughput 1,125 tuples/sec 1,144 tuples/sec 1,245 tuples/sec -1.7% -9.6%
bs=1000 sw=10 sl=64 MB/s 0.687 MB/s 0.698 MB/s 0.76 MB/s -1.6% -9.6%
bs=1000 sw=10 sl=64 p50 877,562 us 869,864 us 862,870 us +0.9% +1.7%
bs=1000 sw=10 sl=64 p95 1,085,247 us 929,807 us 905,485 us +16.7% +19.9%
bs=1000 sw=10 sl=64 p99 1,085,247 us 929,807 us 948,588 us +16.7% +14.4%
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,467.79,200,128000,428,0.261,22456.09,32344.09,32344.09
1,100,10,64,20,2075.08,2000,1280000,964,0.588,100070.91,128656.03,128656.03
2,1000,10,64,20,17781.30,20000,12800000,1125,0.687,877561.99,1085247.22,1085247.22

@kz930 kz930 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The empty default keeps saved workflows unchanged, and the missing-column error page is nicer than Scatter Plot's ValueError.

…over-column

# Conflicts:
#	common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/volcanoPlot/VolcanoPlotOpDesc.scala

@kunwp1 kunwp1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Remove the export saved-workflow test, compare the engine whitespace and saved-workflow tests against the default operator, and file the two required-field tests back under generatePythonCode.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Volcano Plot: hover label is always the first input column; expose a Hover column property like Scatter Plot

4 participants