Repository navigation
test(workflow-operator): cover the SQL, R-UDF, scorer and ECDF descriptors - #7899
Merged
Merged
Conversation
…ptors 36 tests to 47. SQLSourceOpDesc, RUDFSourceOpDesc and MachineLearningScorerOpDesc all reach 100%; ECDFPlotOpDesc reaches its structural ceiling of 42/48. The bundle goes 85.2% to 94.6% and missed branch arms 48 to 27. TimeSeriesOpDesc was in the original scope and is deliberately absent: all five of its partials are Scala's null-safe comparison against a String literal, where one arm needs the constant itself to be null, and the null path is a crash inside the pyb macro rather than a behaviour. 28 mutations, 27 killed. The first pass reported no survivors while two reviewers demonstrated eight. The remaining one is equivalent -- PhysicalOp.sourcePhysicalOp already defaults the value it deletes. Found while measuring, and worth knowing beyond this PR: module-wide branch totals are not quotable as evidence here, because IntervalJoinOpExec's covering spec uses an unseeded RNG and its branch count drifts run to run.
Contributor
Automated Reviewer SuggestionsBased on the
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7899 +/- ##
============================================
+ Coverage 92.36% 92.40% +0.04%
- Complexity 4584 4605 +21
============================================
Files 1173 1173
Lines 47347 47347
Branches 5306 5306
============================================
+ Hits 43731 43752 +21
+ Misses 2020 2015 -5
+ Partials 1596 1580 -16
*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:
|
Contributor
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 413 | 0.252 | 23,907/31,479/31,479 us | 🔴 +22.3% / 🔴 +119.6% |
| 🔴 | bs=100 sw=10 sl=64 | 916 | 0.559 | 106,001/128,651/128,651 us | 🔴 +10.9% / 🔴 +29.3% |
| ⚪ | bs=1000 sw=10 sl=64 | 1,109 | 0.677 | 894,092/969,383/969,383 us | ⚪ within ±5% / ⚪ within ±5% |
Baseline details
Latest main 4786d6c from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 413 tuples/sec | 459 tuples/sec | 833.1 tuples/sec | -10.0% | -50.4% |
| bs=10 sw=10 sl=64 | MB/s | 0.252 MB/s | 0.28 MB/s | 0.508 MB/s | -10.0% | -50.4% |
| bs=10 sw=10 sl=64 | p50 | 23,907 us | 19,553 us | 11,860 us | +22.3% | +101.6% |
| bs=10 sw=10 sl=64 | p95 | 31,479 us | 33,567 us | 14,334 us | -6.2% | +119.6% |
| bs=10 sw=10 sl=64 | p99 | 31,479 us | 33,567 us | 18,194 us | -6.2% | +73.0% |
| bs=100 sw=10 sl=64 | throughput | 916 tuples/sec | 967 tuples/sec | 1,085 tuples/sec | -5.3% | -15.6% |
| bs=100 sw=10 sl=64 | MB/s | 0.559 MB/s | 0.59 MB/s | 0.662 MB/s | -5.3% | -15.6% |
| bs=100 sw=10 sl=64 | p50 | 106,001 us | 103,174 us | 92,973 us | +2.7% | +14.0% |
| bs=100 sw=10 sl=64 | p95 | 128,651 us | 116,057 us | 99,460 us | +10.9% | +29.3% |
| bs=100 sw=10 sl=64 | p99 | 128,651 us | 116,057 us | 107,737 us | +10.9% | +19.4% |
| bs=1000 sw=10 sl=64 | throughput | 1,109 tuples/sec | 1,127 tuples/sec | 1,111 tuples/sec | -1.6% | -0.2% |
| bs=1000 sw=10 sl=64 | MB/s | 0.677 MB/s | 0.688 MB/s | 0.678 MB/s | -1.6% | -0.2% |
| bs=1000 sw=10 sl=64 | p50 | 894,092 us | 880,979 us | 915,816 us | +1.5% | -2.4% |
| bs=1000 sw=10 sl=64 | p95 | 969,383 us | 925,512 us | 959,066 us | +4.7% | +1.1% |
| bs=1000 sw=10 sl=64 | p99 | 969,383 us | 925,512 us | 993,644 us | +4.7% | -2.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,483.85,200,128000,413,0.252,23907.34,31479.08,31479.08
1,100,10,64,20,2183.30,2000,1280000,916,0.559,106001.21,128651.24,128651.24
2,1000,10,64,20,18038.96,20000,12800000,1109,0.677,894092.00,969383.23,969383.23Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Xinyuan Lin <xinyual3@uci.edu>
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.
What changes were proposed in this PR?
Four operator descriptors. 36 tests → 47.
Measured with a full-module
WorkflowOperator/jacoco, one fresh sbt JVM per run, and the same suite-name exclusion on both sides (FileScanSourceOpExecSpecaborts inside a git worktree — a worktree's.gitis a file, so it throwsRepositoryNotFoundExceptioninbeforeAll— and since sbt-jacoco runs unforked, a failing test task yields an all-zero report rather than a partial one).SQLSourceOpDesc.scalaRUDFSourceOpDesc.scalaMachineLearningScorerOpDesc.scalaECDFPlotOpDesc.scalaJaCoCo line-hit goes 199/203 → 203/203.
TimeSeriesOpDescwas in the original scope and is deliberately absent. It is worth exactly zero: all five of its partials are Scala's null-safe comparison against a String literal, where one arm requires the constant itself to be null. A probe setting every field to null left it unchanged at 23/28. And the null path is a crash rather than a behaviour —dropnaCols.map(c => pyb"$c")NPEs inside thepybmacro on Base64 of a null string. Pinning it would cement junk.Verification
28 mutations, 27 killed, 1 equivalent survivor.
The first draft reported no survivors. Two adversarial reviewers demonstrated 8 survivors between them, and every one that could be reproduced was real. All are now dead.
Representative repairs, each proven by the mutation it now kills:
TINYINT→INTEGER,FLOAT/REAL→DOUBLE,BIT→BOOLEAN, and the rest).endWith, leaving the half of the message that names the failing operator unpinned. They are now exact equalities against the concrete subclass name the spec itself controls.pd.to_numeric(beforepx.ecdf(beforeplotly.io.to_html().includechecks are now line-anchored.The survivor: deleting
.withParallelizable(false)from the else arm of RUDF's worker-count guard.PhysicalOp.sourcePhysicalOpalready defaults it, so nothing observable changes — an equivalent mutant, not a coverage gap.Two reviewer suggestions were refused
withParallelizable(false)call really is unobservable — but the suggested fix would have made the suite weaker, since the test pins more than that one call.A collateral claim about the builder's own harness was also left unasserted rather than repeated, on the grounds that it could not be verified from the state the worktree was handed over in.
A nondeterminism source found along the way
The module-wide branch total does not move by exactly the amount these four files account for, and the residual is not measurement noise in this bundle: it is
IntervalJoinOpExec.scala, whose covering spec uses an unseeded RNG, so its branch count drifts run to run. That is worth knowing because it makes module-level branch totals unquotable as evidence for any PR touching this module. Seeding that spec is already part of #7800.Same-input reproducibility is otherwise good: the final
jacoco.xmlis byte-identical to a reviewer's independently produced report.Deliberately not included, with evidence
ECDFPlotOpDesccannot exceed 42/48.javaponcreatePlotlyFigureshows the three-jump null-safe form, and theifnull-taken arm needs the literal"sum"to be null. A probe moved those lines fromcb=3tocb=5withmbunchanged — 8 arms, zero lines. Two further lines would need ahashCodecollision with"count"or"sum"that is not equal to it: constructible in principle, padding in practice.java.lang.Enum, so the lambda bridge's checkcast admits a foreign enum —List(java.time.DayOfWeek.MONDAY).asInstanceOf[…]does reach thecase _throw and takes the file to 33/33. No production route exists, because Jackson rejects an unknown enum name first, so it is excluded.requiremessage strings are lifted to$anonfun$querySchema$1..6and dropped bySyntheticFilter; their source lines already read as covered because the closure allocation is attributed to the enclosing method.foldLeftbody making its only schema-typing decision is a$anonfun, so it is not in the tracked denominator either way.Every spec in the bundle carries a JSON round-trip test, per house convention. No descriptor subtype is defined in any spec, because
PythonCodeRawInvalidTextSpecinstantiates every subclass by reflection and a test-only subtype would break it.No production file is touched, and no stray
test_large_binary.txtwas left behind.Any related issues, documentation, discussions?
Closes #7898
How was this PR tested?
Test/scalafmtCheckandTest/scalafix --checkboth pass.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 5)