The GitHub Actions job "Required Checks" on texera.git/main has succeeded.
Run started by GitHub user Yicong-Huang (triggered by Yicong-Huang).

Head commit for run:
1c2a8c533fdee922f93a0cfbb2c94f407df54faa / Xinyuan Lin <[email protected]>
test(amber): add unit test coverage for non-range partitioners (#4746)

### What changes were proposed in this PR?

Add `PartitionersSpec` covering the four send-semantics partitioners
that currently lack unit tests (only `RangeBasedShufflePartitioner` had
existing coverage in `RangeBasedShuffleSpec`):

- `OneToOnePartitioner` — `getBucketIndex` always emits `Iterator(0)`;
`allReceivers` selects the channel whose `fromWorkerId` matches the
actor id
- `BroadcastPartitioner` — `getBucketIndex` yields every receiver index
for any tuple; `allReceivers` is deduplicated
- `RoundRobinPartitioner` — `getBucketIndex` cycles bucket indices
(asserting the current contract that the first emitted index is 1, since
the implementation increments before emitting); `allReceivers` preserves
channel order while deduplicating
- `HashBasedShufflePartitioner` — `getBucketIndex` is in-range;
deterministic for the *same tuple instance* across consecutive calls;
depends only on the configured hash-attribute subset (swept across
multiple keys × multiple varying non-hash fields); falls back to the
full tuple when no hash attributes are configured (verified by spanning
>1 bucket across 50 samples that vary only the non-key field);
`allReceivers` deduplicates

### Any related issues, documentation, discussions?

Closes #4745

### How was this PR tested?

`sbt "WorkflowExecutionService/testOnly
org.apache.texera.amber.engine.architecture.sendsemantics.partitioners.PartitionersSpec"`
— 11/11 tests pass.

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

Generated-by: Claude Code (Claude Opus 4.7)

---------

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>

Report URL: https://github.com/apache/texera/actions/runs/25276962935

With regards,
GitHub Actions via GitBox

Reply via email to