You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "aglinxinyuan (via GitHub)" <gi...@apache.org> on 2026/07/04 08:48:51 UTC

[PR] test(workflow-operator): add unit test coverage for interval-join, sleep, and cache-source executors [texera]

aglinxinyuan opened a new pull request, #6098:
URL: https://github.com/apache/texera/pull/6098

   ### What changes were proposed in this PR?
   
   Add unit test coverage for three `workflow-operator` executors, selected from the Codecov report. No production-code changes.
   
   | File | Codecov before | New coverage |
   | --- | --- | --- |
   | `IntervalJoinOpExec.scala` | 81% | extends the existing spec to cover the YEAR/MONTH/HOUR/MINUTE/SECOND timestamp interval-unit arms and the unsupported-key-type `WorkflowRuntimeException` |
   | `SleepOpExec.scala` | 0% | new spec: construction from a serialized desc + the pass-through `processTuple` (sleepTime 0) |
   | `CacheSourceOpExec.scala` | 0% | new spec covering the constructor's non-result-URI and non-vfs-URI rejections |
   
   The `CacheSourceOpExec` result-storage read path needs a live Iceberg catalog and stays in the amber integration suite. Likewise the `IntervalJoin` `case None` interval arm requires a JSON payload with the field absent (Jackson maps an explicit `None` to `Some(null)`), so it is left to integration.
   
   ### Any related issues, documentation, discussions?
   
   Follow-up to the review feedback on #6043: prioritize tests that fill uncovered code paths.
   
   ### How was this PR tested?
   
   - `sbt "WorkflowOperator/testOnly *IntervalOpExecSpec *SleepOpExecSpec *CacheSourceOpExecSpec"` — 19 tests, all green
   - `sbt "WorkflowOperator/Test/scalafmtCheck"` and `sbt "WorkflowOperator/scalafixAll --check"` — clean
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 4.8 [1M context])
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(workflow-operator): add unit test coverage for interval-join, and sleep [texera]

Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan merged PR #6098:
URL: https://github.com/apache/texera/pull/6098


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(workflow-operator): add unit test coverage for interval-join, sleep, and cache-source executors [texera]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #6098:
URL: https://github.com/apache/texera/pull/6098#discussion_r3522882104


##########
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/sleep/SleepOpExecSpec.scala:
##########
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.texera.amber.operator.sleep
+
+import org.apache.texera.amber.core.tuple.{Attribute, AttributeType, Schema, Tuple}
+import org.apache.texera.amber.util.JSONUtils.objectMapper
+import org.scalatest.flatspec.AnyFlatSpec
+
+class SleepOpExecSpec extends AnyFlatSpec {
+
+  private val schema: Schema = Schema().add(new Attribute("v", AttributeType.INTEGER))
+
+  private def tuple(v: Int): Tuple =
+    Tuple.builder(schema).add(new Attribute("v", AttributeType.INTEGER), Integer.valueOf(v)).build()
+
+  // SleepOpDesc is a LogicalOp: serialize a real instance so the polymorphic operatorType
+  // discriminator is present (a hand-written JSON string would fail to deserialize).
+  private def descString(sleepTime: Int): String = {
+    val desc = new SleepOpDesc()
+    desc.sleepTime = sleepTime
+    objectMapper.writeValueAsString(desc)
+  }
+
+  "SleepOpExec" should "construct from a serialized SleepOpDesc" in {
+    val exec = new SleepOpExec(descString(0))
+    assert(exec != null)
+  }
+
+  "SleepOpExec.processTuple" should "return the input tuple unchanged" in {
+    // sleepTime = 0 -> Thread.sleep(0), instant
+    val exec = new SleepOpExec(descString(0))
+    val emitted = exec.processTuple(tuple(7), 0).toList
+    assert(emitted.map(_.asInstanceOf[Tuple]) == List(tuple(7)))
+  }

Review Comment:
   The `.asInstanceOf[Tuple]` cast is unnecessary here (SleepOpExec returns the same input `Tuple`), and it makes the test less clear. Comparing the emitted list directly avoids an unsafe cast.



##########
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/sleep/SleepOpExecSpec.scala:
##########
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.texera.amber.operator.sleep
+
+import org.apache.texera.amber.core.tuple.{Attribute, AttributeType, Schema, Tuple}
+import org.apache.texera.amber.util.JSONUtils.objectMapper
+import org.scalatest.flatspec.AnyFlatSpec
+
+class SleepOpExecSpec extends AnyFlatSpec {
+
+  private val schema: Schema = Schema().add(new Attribute("v", AttributeType.INTEGER))
+
+  private def tuple(v: Int): Tuple =
+    Tuple.builder(schema).add(new Attribute("v", AttributeType.INTEGER), Integer.valueOf(v)).build()
+
+  // SleepOpDesc is a LogicalOp: serialize a real instance so the polymorphic operatorType
+  // discriminator is present (a hand-written JSON string would fail to deserialize).
+  private def descString(sleepTime: Int): String = {
+    val desc = new SleepOpDesc()
+    desc.sleepTime = sleepTime
+    objectMapper.writeValueAsString(desc)
+  }
+
+  "SleepOpExec" should "construct from a serialized SleepOpDesc" in {
+    val exec = new SleepOpExec(descString(0))
+    assert(exec != null)
+  }
+
+  "SleepOpExec.processTuple" should "return the input tuple unchanged" in {
+    // sleepTime = 0 -> Thread.sleep(0), instant
+    val exec = new SleepOpExec(descString(0))
+    val emitted = exec.processTuple(tuple(7), 0).toList
+    assert(emitted.map(_.asInstanceOf[Tuple]) == List(tuple(7)))
+  }
+
+  it should "emit exactly one tuple per input" in {
+    val exec = new SleepOpExec(descString(0))
+    val emitted = (0 until 5).flatMap(i => exec.processTuple(tuple(i), 0).toList)
+    assert(emitted.map(_.asInstanceOf[Tuple]) == (0 until 5).map(tuple).toList)

Review Comment:
   Same as above: avoid `.asInstanceOf[Tuple]` and compare emitted tuples directly to keep the test type-safe and easier to read.



##########
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/intervalJoin/IntervalOpExecSpec.scala:
##########
@@ -498,4 +498,38 @@ class IntervalOpExecSpec extends AnyFlatSpec with BeforeAndAfter {
     )
   }
 
+  it should "join timestamps across every interval unit" in {
+    val base = Timestamp.valueOf("2020-01-01 00:00:00")
+    Seq(
+      TimeIntervalType.YEAR,
+      TimeIntervalType.MONTH,
+      TimeIntervalType.HOUR,
+      TimeIntervalType.MINUTE,
+      TimeIntervalType.SECOND
+    ).foreach { unit =>
+      val desc = new IntervalJoinOpDesc("point", "range", 3L, true, true, unit)
+      val exec = new IntervalJoinOpExec(objectMapper.writeValueAsString(desc))
+      exec.open()
+      assert(exec.processTuple(timeStampTuple("range", 1, base), right).isEmpty)
+      val out = exec.processTuple(timeStampTuple("point", 1, base), left).toList
+      assert(out.size == 1, s"expected a match for unit $unit")
+      assert(out.head.getFields.length == 4)
+      exec.close()

Review Comment:
   `exec.close()` is not guaranteed to run if an assertion fails inside the loop, which can leak resources and make later tests flaky. Wrapping the body in `try`/`finally` ensures the executor is always closed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(workflow-operator): add unit test coverage for interval-join, sleep, and cache-source executors [texera]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #6098:
URL: https://github.com/apache/texera/pull/6098#issuecomment-4881359044

   ## [Codecov](https://app.codecov.io/gh/apache/texera/pull/6098?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 59.06%. Comparing base ([`bc5accf`](https://app.codecov.io/gh/apache/texera/commit/bc5accff3797d538d165b7c0acd7f5112eabf031?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`1644a5b`](https://app.codecov.io/gh/apache/texera/commit/1644a5b33294b96e951bce6d95912259488e5d50?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 2 commits behind head on main.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff            @@
   ##               main    #6098   +/-   ##
   =========================================
     Coverage     59.06%   59.06%           
     Complexity     3203     3203           
   =========================================
     Files          1132     1132           
     Lines         43674    43674           
     Branches       4734     4734           
   =========================================
     Hits          25797    25797           
     Misses        16448    16448           
     Partials       1429     1429           
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/texera/pull/6098/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | *Carryforward flag |
   |---|---|---|---|
   | [access-control-service](https://app.codecov.io/gh/apache/texera/pull/6098/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `70.00% <ø> (ø)` | | Carriedforward from [bc5accf](https://app.codecov.io/gh/apache/texera/commit/bc5accff3797d538d165b7c0acd7f5112eabf031?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [agent-service](https://app.codecov.io/gh/apache/texera/pull/6098/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `44.59% <ø> (ø)` | | Carriedforward from [bc5accf](https://app.codecov.io/gh/apache/texera/commit/bc5accff3797d538d165b7c0acd7f5112eabf031?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [amber](https://app.codecov.io/gh/apache/texera/pull/6098/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `62.95% <ø> (ø)` | | Carriedforward from [bc5accf](https://app.codecov.io/gh/apache/texera/commit/bc5accff3797d538d165b7c0acd7f5112eabf031?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [computing-unit-managing-service](https://app.codecov.io/gh/apache/texera/pull/6098/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `0.00% <ø> (ø)` | | Carriedforward from [bc5accf](https://app.codecov.io/gh/apache/texera/commit/bc5accff3797d538d165b7c0acd7f5112eabf031?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [config-service](https://app.codecov.io/gh/apache/texera/pull/6098/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `52.30% <ø> (ø)` | | |
   | [file-service](https://app.codecov.io/gh/apache/texera/pull/6098/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `62.81% <ø> (ø)` | | Carriedforward from [bc5accf](https://app.codecov.io/gh/apache/texera/commit/bc5accff3797d538d165b7c0acd7f5112eabf031?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [frontend](https://app.codecov.io/gh/apache/texera/pull/6098/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `51.37% <ø> (ø)` | | Carriedforward from [bc5accf](https://app.codecov.io/gh/apache/texera/commit/bc5accff3797d538d165b7c0acd7f5112eabf031?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [notebook-migration-service](https://app.codecov.io/gh/apache/texera/pull/6098/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `78.57% <ø> (ø)` | | Carriedforward from [bc5accf](https://app.codecov.io/gh/apache/texera/commit/bc5accff3797d538d165b7c0acd7f5112eabf031?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [pyamber](https://app.codecov.io/gh/apache/texera/pull/6098/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `91.15% <ø> (ø)` | | Carriedforward from [bc5accf](https://app.codecov.io/gh/apache/texera/commit/bc5accff3797d538d165b7c0acd7f5112eabf031?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [workflow-compiling-service](https://app.codecov.io/gh/apache/texera/pull/6098/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.14% <ø> (ø)` | | Carriedforward from [bc5accf](https://app.codecov.io/gh/apache/texera/commit/bc5accff3797d538d165b7c0acd7f5112eabf031?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   *This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/texera/pull/6098?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(workflow-operator): add unit test coverage for interval-join, sleep, and cache-source executors [texera]

Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan commented on code in PR #6098:
URL: https://github.com/apache/texera/pull/6098#discussion_r3522942296


##########
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/intervalJoin/IntervalOpExecSpec.scala:
##########
@@ -498,4 +498,38 @@ class IntervalOpExecSpec extends AnyFlatSpec with BeforeAndAfter {
     )
   }
 
+  it should "join timestamps across every interval unit" in {
+    val base = Timestamp.valueOf("2020-01-01 00:00:00")
+    Seq(
+      TimeIntervalType.YEAR,
+      TimeIntervalType.MONTH,
+      TimeIntervalType.HOUR,
+      TimeIntervalType.MINUTE,
+      TimeIntervalType.SECOND
+    ).foreach { unit =>
+      val desc = new IntervalJoinOpDesc("point", "range", 3L, true, true, unit)
+      val exec = new IntervalJoinOpExec(objectMapper.writeValueAsString(desc))
+      exec.open()
+      assert(exec.processTuple(timeStampTuple("range", 1, base), right).isEmpty)
+      val out = exec.processTuple(timeStampTuple("point", 1, base), left).toList
+      assert(out.size == 1, s"expected a match for unit $unit")
+      assert(out.head.getFields.length == 4)
+      exec.close()

Review Comment:
   Done — the per-unit loop body is now wrapped in try/finally so the executor is always closed even if an assertion fails.



##########
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/sleep/SleepOpExecSpec.scala:
##########
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.texera.amber.operator.sleep
+
+import org.apache.texera.amber.core.tuple.{Attribute, AttributeType, Schema, Tuple}
+import org.apache.texera.amber.util.JSONUtils.objectMapper
+import org.scalatest.flatspec.AnyFlatSpec
+
+class SleepOpExecSpec extends AnyFlatSpec {
+
+  private val schema: Schema = Schema().add(new Attribute("v", AttributeType.INTEGER))
+
+  private def tuple(v: Int): Tuple =
+    Tuple.builder(schema).add(new Attribute("v", AttributeType.INTEGER), Integer.valueOf(v)).build()
+
+  // SleepOpDesc is a LogicalOp: serialize a real instance so the polymorphic operatorType
+  // discriminator is present (a hand-written JSON string would fail to deserialize).
+  private def descString(sleepTime: Int): String = {
+    val desc = new SleepOpDesc()
+    desc.sleepTime = sleepTime
+    objectMapper.writeValueAsString(desc)
+  }
+
+  "SleepOpExec" should "construct from a serialized SleepOpDesc" in {
+    val exec = new SleepOpExec(descString(0))
+    assert(exec != null)
+  }
+
+  "SleepOpExec.processTuple" should "return the input tuple unchanged" in {
+    // sleepTime = 0 -> Thread.sleep(0), instant
+    val exec = new SleepOpExec(descString(0))
+    val emitted = exec.processTuple(tuple(7), 0).toList
+    assert(emitted.map(_.asInstanceOf[Tuple]) == List(tuple(7)))
+  }

Review Comment:
   Done — dropped the asInstanceOf[Tuple] cast and compare the emitted list directly (Tuple is a TupleLike, so equality works).



##########
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/sleep/SleepOpExecSpec.scala:
##########
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.texera.amber.operator.sleep
+
+import org.apache.texera.amber.core.tuple.{Attribute, AttributeType, Schema, Tuple}
+import org.apache.texera.amber.util.JSONUtils.objectMapper
+import org.scalatest.flatspec.AnyFlatSpec
+
+class SleepOpExecSpec extends AnyFlatSpec {
+
+  private val schema: Schema = Schema().add(new Attribute("v", AttributeType.INTEGER))
+
+  private def tuple(v: Int): Tuple =
+    Tuple.builder(schema).add(new Attribute("v", AttributeType.INTEGER), Integer.valueOf(v)).build()
+
+  // SleepOpDesc is a LogicalOp: serialize a real instance so the polymorphic operatorType
+  // discriminator is present (a hand-written JSON string would fail to deserialize).
+  private def descString(sleepTime: Int): String = {
+    val desc = new SleepOpDesc()
+    desc.sleepTime = sleepTime
+    objectMapper.writeValueAsString(desc)
+  }
+
+  "SleepOpExec" should "construct from a serialized SleepOpDesc" in {
+    val exec = new SleepOpExec(descString(0))
+    assert(exec != null)
+  }
+
+  "SleepOpExec.processTuple" should "return the input tuple unchanged" in {
+    // sleepTime = 0 -> Thread.sleep(0), instant
+    val exec = new SleepOpExec(descString(0))
+    val emitted = exec.processTuple(tuple(7), 0).toList
+    assert(emitted.map(_.asInstanceOf[Tuple]) == List(tuple(7)))
+  }
+
+  it should "emit exactly one tuple per input" in {
+    val exec = new SleepOpExec(descString(0))
+    val emitted = (0 until 5).flatMap(i => exec.processTuple(tuple(i), 0).toList)
+    assert(emitted.map(_.asInstanceOf[Tuple]) == (0 until 5).map(tuple).toList)

Review Comment:
   Done — same here; the multi-tuple assertion now compares emitted tuples directly without the cast.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(workflow-operator): add unit test coverage for interval-join, sleep, and cache-source executors [texera]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6098:
URL: https://github.com/apache/texera/pull/6098#issuecomment-4881353527

   <!-- texera-reviewer-suggestion -->
   ### Automated Reviewer Suggestions
   
   Based on the `git blame` history of the changed files, we recommend the following reviewers:
   
   - **Contributors with relevant context:** `@Yicong-Huang`
     You can notify them by mentioning `@Yicong-Huang` in a comment.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(workflow-operator): add unit test coverage for interval-join, sleep, and cache-source executors [texera]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6098:
URL: https://github.com/apache/texera/pull/6098#issuecomment-4881368276

   <!-- texera-benchmarks-comment -->
   ## ⚠️ Benchmark changes need a look
   
   🟢 2 better · 🔴 3 worse · ⚪ 10 noise (<±5%) · 0 without baseline
   
   > Compared against main `4c9d30a` 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](https://apache.github.io/texera/dev/bench/) · [Run](https://github.com/apache/texera/actions/runs/28701009556)
   
   | | config | throughput | MB/s | latency | max Δ latest / 7d |
   |---|---|---:|---:|---:|---:|
   | 🔴 | bs=10 sw=10 sl=64 | 390 | 0.238 | 24,641/34,694/34,694 us | 🔴 +12.9% / 🔴 +126.3% |
   | 🟢 | bs=100 sw=10 sl=64 | 810 | 0.495 | 121,846/138,335/138,335 us | 🟢 -28.2% / 🔴 +27.7% |
   | ⚪ | bs=1000 sw=10 sl=64 | 926 | 0.565 | 1,080,113/1,151,746/1,151,746 us | ⚪ within ±5% / 🔴 +11.6% |
   
   <details><summary>Baseline details</summary>
   
   Latest main `4c9d30a` from same runner
   
   | config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
   |---|---|---:|---:|---:|---:|---:|
   | bs=10 sw=10 sl=64 | throughput | 390 tuples/sec | 417 tuples/sec | 772.08 tuples/sec | -6.5% | -49.5% |
   | bs=10 sw=10 sl=64 | MB/s | 0.238 MB/s | 0.254 MB/s | 0.471 MB/s | -6.3% | -49.5% |
   | bs=10 sw=10 sl=64 | p50 | 24,641 us | 21,830 us | 12,745 us | +12.9% | +93.3% |
   | bs=10 sw=10 sl=64 | p95 | 34,694 us | 36,155 us | 15,330 us | -4.0% | +126.3% |
   | bs=10 sw=10 sl=64 | p99 | 34,694 us | 36,155 us | 19,054 us | -4.0% | +82.1% |
   | bs=100 sw=10 sl=64 | throughput | 810 tuples/sec | 798 tuples/sec | 982.64 tuples/sec | +1.5% | -17.6% |
   | bs=100 sw=10 sl=64 | MB/s | 0.495 MB/s | 0.487 MB/s | 0.6 MB/s | +1.6% | -17.5% |
   | bs=100 sw=10 sl=64 | p50 | 121,846 us | 120,017 us | 101,961 us | +1.5% | +19.5% |
   | bs=100 sw=10 sl=64 | p95 | 138,335 us | 192,788 us | 108,335 us | -28.2% | +27.7% |
   | bs=100 sw=10 sl=64 | p99 | 138,335 us | 192,788 us | 114,379 us | -28.2% | +20.9% |
   | bs=1000 sw=10 sl=64 | throughput | 926 tuples/sec | 916 tuples/sec | 1,013 tuples/sec | +1.1% | -8.6% |
   | bs=1000 sw=10 sl=64 | MB/s | 0.565 MB/s | 0.559 MB/s | 0.618 MB/s | +1.1% | -8.6% |
   | bs=1000 sw=10 sl=64 | p50 | 1,080,113 us | 1,094,715 us | 993,573 us | -1.3% | +8.7% |
   | bs=1000 sw=10 sl=64 | p95 | 1,151,746 us | 1,118,510 us | 1,032,489 us | +3.0% | +11.6% |
   | bs=1000 sw=10 sl=64 | p99 | 1,151,746 us | 1,118,510 us | 1,065,526 us | +3.0% | +8.1% |
   
   </details>
   
   <details><summary>Raw CSV</summary>
   
   ```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,512.71,200,128000,390,0.238,24640.94,34693.75,34693.75
   1,100,10,64,20,2467.65,2000,1280000,810,0.495,121846.01,138334.76,138334.76
   2,1000,10,64,20,21599.89,20000,12800000,926,0.565,1080112.63,1151746.12,1151746.12
   ```
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(workflow-operator): add unit test coverage for interval-join, sleep, and cache-source executors [texera]

Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan commented on PR #6098:
URL: https://github.com/apache/texera/pull/6098#issuecomment-4884397462

   Good catch — no, we're not. Cache source operators were replaced by input-port materialization reader threads in #3425. `SpecialPhysicalOpFactory.newSourcePhysicalOp` — the only producer of `OpExecSource`, which is what constructs `CacheSourceOpExec` in `DataProcessorRPCHandlerInitializer.setupExecutor` — no longer has any production caller, so both are effectively dead code.
   
   Dropped `CacheSourceOpExecSpec` from this PR in 19d4967 — no point covering a path that's on its way out. Filed #6125 to remove `CacheSourceOpExec` and the `OpExecSource` plumbing as a follow-up.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(workflow-operator): add unit test coverage for interval-join, sleep, and cache-source executors [texera]

Posted by "Yicong-Huang (via GitHub)" <gi...@apache.org>.
Yicong-Huang commented on PR #6098:
URL: https://github.com/apache/texera/pull/6098#issuecomment-4884401402

   please also update the PR description ;)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(workflow-operator): add unit test coverage for interval-join, sleep, and cache-source executors [texera]

Posted by "Yicong-Huang (via GitHub)" <gi...@apache.org>.
Yicong-Huang commented on PR #6098:
URL: https://github.com/apache/texera/pull/6098#issuecomment-4883722318

   @aglinxinyuan are we still using cache source opexec?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org