This is an automated email from the ASF dual-hosted git repository.
github-merge-queue[bot] pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/texera.git
The following commit(s) were added to refs/heads/main by this push:
new 03290bca81 test(workflow-operator): drop unused IntervalOpExecSpec
helpers (#9328)
03290bca81 is described below
commit 03290bca816b6ece6e448c23be86d38b2094ada1
Author: Xinyuan Lin <[email protected]>
AuthorDate: Mon Nov 9 06:31:12 2026 +0000
test(workflow-operator): drop unused IntervalOpExecSpec helpers (#9328)
### What changes were proposed in this PR?
`IntervalOpExecSpec` in `common/workflow-operator` previously contained
several unused test helper methods, dead fields, and unnecessary
imports:
- `physicalLink()`: constructs a `PhysicalLink` but is uncalled in any
test case.
- `physicalOpId()`: called only by `physicalLink()`.
- `counter`: field used exclusively by `physicalOpId()`, along with dead
reset statements `counter = 0`.
- `integerTuple()`: uncalled tuple construction helper (test cases
exclusively use `newTuple`, `doubleTuple`, or `timeStampTuple`).
- `longTuple()`: uncalled tuple construction helper.
- Unused imports: `OperatorIdentity`, `PhysicalOpIdentity`, and
`PhysicalLink`.
- `BeforeAndAfter`: the spec has no `before` or `after` block, so the
mixin and its import go too.
This PR removes these unused helpers, fields, and imports (-34 net
lines).
### Any related issues, documentation, discussions?
Closes #9326
### How was this PR tested?
Verified locally via sbt in the `WorkflowOperator` project:
```bash
sbt "WorkflowOperator/Test/compile" "WorkflowOperator/scalafmtCheckAll"
"WorkflowOperator/scalafixAll --check" "WorkflowOperator/testOnly
org.apache.texera.amber.operator.intervalJoin.IntervalOpExecSpec"
```
Result:
- Test/compile, `scalafmtCheckAll` and `scalafixAll --check`:
`[success]`
- `[info] Total number of tests run: 16`
- `[info] Suites: completed 1, aborted 0`
- `[info] Tests: succeeded 16, failed 0, canceled 0, ignored 0, pending
0`
- `[info] All tests passed.`
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Google Antigravity (Gemini 2.5 Pro), Claude Code (Claude
Opus 5.5)
---
.../operator/intervalJoin/IntervalOpExecSpec.scala | 38 ++--------------------
1 file changed, 2 insertions(+), 36 deletions(-)
diff --git
a/common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/intervalJoin/IntervalOpExecSpec.scala
b/common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/intervalJoin/IntervalOpExecSpec.scala
index 87fb7ae5cd..5dbf840ff6 100644
---
a/common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/intervalJoin/IntervalOpExecSpec.scala
+++
b/common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/intervalJoin/IntervalOpExecSpec.scala
@@ -20,16 +20,14 @@
package org.apache.texera.amber.operator.intervalJoin
import org.apache.texera.amber.core.tuple._
-import org.apache.texera.amber.core.virtualidentity.{OperatorIdentity,
PhysicalOpIdentity}
-import org.apache.texera.amber.core.workflow.{PhysicalLink, PortIdentity}
+import org.apache.texera.amber.core.workflow.PortIdentity
import org.apache.texera.amber.util.JSONUtils.objectMapper
-import org.scalatest.BeforeAndAfter
import org.scalatest.flatspec.AnyFlatSpec
import java.sql.Timestamp
import scala.collection.mutable.ArrayBuffer
import scala.util.Random
-class IntervalOpExecSpec extends AnyFlatSpec with BeforeAndAfter {
+class IntervalOpExecSpec extends AnyFlatSpec {
val left: Int = 0
val right: Int = 1
@@ -41,20 +39,6 @@ class IntervalOpExecSpec extends AnyFlatSpec with
BeforeAndAfter {
private val Seed: Long = 20260819L
var opDesc: IntervalJoinOpDesc = _
- var counter: Int = 0
-
- def physicalLink(): PhysicalLink =
- PhysicalLink(
- physicalOpId(),
- fromPortId = PortIdentity(),
- physicalOpId(),
- toPortId = PortIdentity()
- )
-
- def physicalOpId(): PhysicalOpIdentity = {
- counter += 1
- PhysicalOpIdentity(OperatorIdentity("" + counter), "" + counter)
- }
def newTuple[T](name: String, n: Int = 1, i: T, attributeType:
AttributeType): Tuple = {
Tuple
@@ -64,14 +48,6 @@ class IntervalOpExecSpec extends AnyFlatSpec with
BeforeAndAfter {
.build()
}
- def integerTuple(name: String, n: Int = 1, i: Int): Tuple = {
- Tuple
- .builder(schema(name, AttributeType.INTEGER, n))
- .add(new Attribute(name, AttributeType.INTEGER), i)
- .add(new Attribute(name + "_" + 1, AttributeType.INTEGER), i)
- .build()
- }
-
def doubleTuple(name: String, n: Int = 1, i: Double): Tuple = {
Tuple
.builder(schema(name, AttributeType.DOUBLE, n))
@@ -87,14 +63,6 @@ class IntervalOpExecSpec extends AnyFlatSpec with
BeforeAndAfter {
}
- def longTuple(name: String, n: Int = 1, i: Long): Tuple = {
- Tuple
- .builder(schema(name, AttributeType.LONG, n))
- .add(new Attribute(name, AttributeType.LONG), i)
- .add(new Attribute(name + "_" + 1, AttributeType.LONG), i)
- .build()
- }
-
def timeStampTuple(name: String, n: Int = 1, i: Timestamp): Tuple = {
Tuple
.builder(schema(name, AttributeType.TIMESTAMP, n))
@@ -244,7 +212,6 @@ class IntervalOpExecSpec extends AnyFlatSpec with
BeforeAndAfter {
val outputSchema =
opDesc.getExternalOutputSchemas(inputSchemas).values.head
val opExec = new
IntervalJoinOpExec(objectMapper.writeValueAsString(opDesc))
opExec.open()
- counter = 0
var leftIndex: Int = 0
var rightIndex: Int = 0
val orderRandom = new Random(Seed)
@@ -422,7 +389,6 @@ class IntervalOpExecSpec extends AnyFlatSpec with
BeforeAndAfter {
opDesc.timeIntervalType = Option(TimeIntervalType.DAY)
val opExec = new
IntervalJoinOpExec(objectMapper.writeValueAsString(opDesc))
opExec.open()
- counter = 0
val pointList: Array[Double] = Array(1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1,
8.1, 9.1, 10.1)
pointList.foreach(i => {
assert(