Skip to content

fix(workflow-operator, v1.2): fall back to day semantics for an unset interval type; extend aggregate and interval-join tests - #7007

Open
Yicong-Huang wants to merge 1 commit into
release/v1.2from
backport/6907-fall-back-to-day-semantics-for-an-unset-v1.2
Open

fix(workflow-operator, v1.2): fall back to day semantics for an unset interval type; extend aggregate and interval-join tests #7007
Yicong-Huang wants to merge 1 commit into
release/v1.2from
backport/6907-fall-back-to-day-semantics-for-an-unset-v1.2

Conversation

@Yicong-Huang

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Backport of #6907 to release/v1.2, cherry-picked from 03a0e3a.

Source fix only. The test changes from #6907 were omitted: the touched test spec(s) do not exist on release/v1.2 (or depend on main-only test infrastructure), so backporting them cleanly is not possible. Only the source fix is carried over, per maintainer guidance.

Any related issues, documentation, discussions?

Backport of #6907. Originally linked #6901.

How was this PR tested?

Release-branch CI runs on this PR. The source change cherry-picked cleanly; test changes were intentionally dropped (see above).

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

Yes — backport prepared with Claude Code (mechanical cherry-pick + conflict resolution; the change itself is #6907 by its original author).

🤖 Generated with Claude Code

…val type; extend aggregate and interval-join tests (#6907)

### What changes were proposed in this PR?

Writing the coverage tests asked for in #6901 turned up a live defect in
`IntervalJoinOpExec`, so this fixes that and adds the tests around it.

**An unset `timeIntervalType` crashed the timestamp branch instead of
falling back to days.** `IntervalJoinOpDesc` declares `var
timeIntervalType: Option[TimeIntervalType] = _`, and an absent JSON
field deserializes to `Some(null)` — not `None`, and not `null`. The
match in `intervalCompare` only handled `Some(<each unit>)` and `None`,
so any TIMESTAMP interval join whose descriptor omits the field died
with `scala.MatchError: Some(null)` rather than taking the documented
day fallback. Replaced `case None` with a catch-all, which also covers
`None` and any unit added later. This makes the fallback arm reachable
for the first time; it was dead code before.

On the coverage side, `AggregationOperationSpec` gains the accepting
half of the SUM/MIN/MAX type guard — the four-clause `!= INTEGER && !=
DOUBLE && != LONG && != TIMESTAMP` chain was only ever driven with
INTEGER/DOUBLE and the rejecting types, so its later clauses were never
walked — plus AVERAGE over a TIMESTAMP column, which is the only route
into the `parseTimestamp(...).getTime` branch of `getNumericalValue`
(AVERAGE is otherwise only exercised over DOUBLE).

Two items from the issue are deliberately **not** included, because they
are already covered on `main`: the `TimeIntervalType` ladder and the
`processNumValue` bound-combination arms were covered by #6098 (`"join
timestamps across every interval unit"` plus the four `[] [) (] ()`
tests), and `newAggFunc`'s non-COUNT arm is covered by the existing SUM
`getFinal` pipeline test. `AveragePartialObj` is likewise already
constructed by an existing test. The `maxAgg` finaliser asymmetry the
issue mentions is left alone — it is a behavior change in live code and
deserves its own PR.

### Any related issues, documentation, discussions?

Closes #6901.

### How was this PR tested?

Both touched specs pass (27 tests), and the full `WorkflowOperator/test`
suite passes with 1957 tests and no regressions; `scalafmtCheck` and
`scalafix --check` are clean. The new interval-join test is the
regression test for the fix: reverting the catch-all back to `case None`
reddens it with the original `scala.MatchError: Some(null)`, which is
how the defect was found in the first place.

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

(backported from commit 03a0e3a)

Generated-by: Claude Code (Fable 5)
@Yicong-Huang Yicong-Huang added the release/v1.2 back porting to release/v1.2 label Jul 29, 2026
@Yicong-Huang
Yicong-Huang requested a review from xuang7 July 29, 2026 04:31
@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

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

  • No candidates found from git blame history.

@Yicong-Huang Yicong-Huang removed the release/v1.2 back porting to release/v1.2 label Jul 29, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.39%. Comparing base (fd5f487) to head (8ce45fe).
⚠️ Report is 2 commits behind head on release/v1.2.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@                Coverage Diff                 @@
##             release/v1.2    #7007      +/-   ##
==================================================
- Coverage           53.95%   52.39%   -1.56%     
- Complexity           1441     2493    +1052     
==================================================
  Files                 809     1077     +268     
  Lines               34144    42266    +8122     
  Branches             3448     4547    +1099     
==================================================
+ Hits                18421    22146    +3725     
- Misses              14815    18813    +3998     
- Partials              908     1307     +399     
Flag Coverage Δ *Carryforward flag
access-control-service 64.61% <ø> (ø)
agent-service 34.36% <ø> (ø) Carriedforward from fd5f487
amber 52.53% <ø> (-7.09%) ⬇️
computing-unit-managing-service 1.65% <ø> (ø)
config-service 56.06% <ø> (ø)
file-service 58.59% <ø> (ø)
frontend 47.19% <ø> (ø) Carriedforward from fd5f487
pyamber 90.87% <ø> (ø) Carriedforward from fd5f487
python 90.74% <ø> (ø) Carriedforward from fd5f487
workflow-compiling-service 58.69% <ø> (ø)

*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.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants