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:55 UTC
[PR] test(workflow-operator): fill uncovered branches in source/scan and projection descriptors [texera]
aglinxinyuan opened a new pull request, #6100:
URL: https://github.com/apache/texera/pull/6100
### What changes were proposed in this PR?
Fill uncovered branches in four source/scan and projection descriptors, selected from the Codecov report. No production-code changes — extends the existing specs.
| File | Codecov before | Missed branches now covered |
| --- | --- | --- |
| `ProjectionOpDesc.scala` | 69% | `derivePartition` — the hash (kept/empty→unknown), range, and pass-through arms |
| `TextInputSourceOpDesc.scala` | 47% | `getPhysicalOp` wiring (exec class, ports) + schema propagation |
| `FileScanSourceOpDesc.scala` | 37% | `getPhysicalOp` wiring + propagation, and the `outputFileName` filename-column branch of `sourceSchema` |
| `FileScanOpDesc.scala` | 58% | `getPhysicalOp` wiring (input/output ports) + schema propagation |
All targets exercise pure in-memory descriptor logic (`getPhysicalOp`/`derivePartition`/`sourceSchema`); the existing specs only drove the executors or `sourceSchema` defaults.
### 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 *ProjectionOpDescSpec *TextInputSourceOpDescSpec *FileScanSourceOpDescSpec *FileScanOpDescSpec"` — 37 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): fill uncovered branches in source/scan and projection descriptors [texera]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #6100:
URL: https://github.com/apache/texera/pull/6100#discussion_r3522883468
##########
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/source/scan/text/TextInputSourceOpDescSpec.scala:
##########
@@ -180,4 +182,29 @@ class TextInputSourceOpDescSpec extends AnyFlatSpec with BeforeAndAfter {
val path: Path = Paths.get(filePath)
new String(Files.readAllBytes(path), StandardCharsets.UTF_8)
}
+
+ "TextInputSourceOpDesc.getPhysicalOp" should
+ "wire the TextInputSourceOpExec class as a source op with one output port" in {
+ val physical =
+ textInputSourceOpDesc.getPhysicalOp(WorkflowIdentity(1L), ExecutionIdentity(1L))
+ physical.opExecInitInfo match {
+ case OpExecWithClassName(className, _) =>
+ assert(
+ className == "org.apache.texera.amber.operator.source.scan.text.TextInputSourceOpExec"
+ )
Review Comment:
Avoid hardcoding the fully qualified OpExec class name string in the assertion; using the class literal keeps the test resilient to refactors while still validating that the descriptor wiring matches the real class name.
##########
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/projection/ProjectionOpDescSpec.scala:
##########
@@ -110,4 +116,24 @@ class ProjectionOpDescSpec extends AnyFlatSpec with BeforeAndAfter {
}
+ it should "preserve a HashPartition when its attributes are non-empty" in {
+ val out = projectionOpDesc.derivePartition()(List(HashPartition(List("field1"))))
+ assert(out == HashPartition(List("field1")))
+ }
+
+ it should "downgrade an empty HashPartition to UnknownPartition" in {
+ val out = projectionOpDesc.derivePartition()(List(HashPartition(List.empty)))
+ assert(out == UnknownPartition())
+ }
+
+ it should "preserve a RangePartition when its attributes are non-empty" in {
+ val out = projectionOpDesc.derivePartition()(List(RangePartition(List("field2"), 0L, 100L)))
+ assert(out == RangePartition(List("field2"), 0L, 100L))
+ }
+
+ it should "pass through partitions that are neither hash nor range" in {
+ val out = projectionOpDesc.derivePartition()(List(SinglePartition()))
+ assert(out == SinglePartition())
+ }
Review Comment:
ProjectionOpDesc.derivePartition has an uncovered branch where an empty RangePartition should downgrade to UnknownPartition (similar to the empty HashPartition case). Adding an explicit test for the empty-range case will cover that branch and better document the intended behavior.
##########
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/source/scan/file/FileScanSourceOpDescSpec.scala:
##########
@@ -185,4 +188,39 @@ class FileScanSourceOpDescSpec extends AnyFlatSpec with BeforeAndAfter {
FileScanSourceOpExec.close()
}
+ "FileScanSourceOpDesc.getPhysicalOp" should
+ "wire the FileScanSourceOpExec class as a source op and propagate its schema" in {
+ val physical =
+ fileScanSourceOpDesc.getPhysicalOp(WorkflowIdentity(1L), ExecutionIdentity(1L))
+ physical.opExecInitInfo match {
+ case OpExecWithClassName(className, descString) =>
+ assert(
+ className == "org.apache.texera.amber.operator.source.scan.file.FileScanSourceOpExec"
+ )
+ assert(descString.nonEmpty)
Review Comment:
Avoid hardcoding the fully qualified OpExec class name string in the assertion; using the class literal keeps this wiring test aligned with the actual class name if it ever changes.
##########
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/source/scan/file/FileScanOpDescSpec.scala:
##########
@@ -96,4 +98,24 @@ class FileScanOpDescSpec extends AnyFlatSpec with BeforeAndAfter {
assert(processedTuple.getField[String]("filename") == inputFilePath)
fileScanOpExec.close()
}
+
+ "FileScanOpDesc.getPhysicalOp" should
+ "wire the FileScanOpExec class with one input port and one output port" in {
+ val physical = fileScanOpDesc.getPhysicalOp(WorkflowIdentity(1L), ExecutionIdentity(1L))
+ physical.opExecInitInfo match {
+ case OpExecWithClassName(className, payload) =>
+ assert(className == "org.apache.texera.amber.operator.source.scan.file.FileScanOpExec")
+ assert(payload.nonEmpty)
Review Comment:
Avoid hardcoding the fully qualified OpExec class name string in the assertion; using the class literal makes the test robust to refactors while still verifying that getPhysicalOp wires the correct executor.
--
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): fill uncovered branches in source/scan and projection descriptors [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6100:
URL: https://github.com/apache/texera/pull/6100#issuecomment-4881368633
<!-- texera-benchmarks-comment -->
## ⚠️ Benchmark changes need a look
🟢 0 better · 🔴 10 worse · ⚪ 5 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/28701011150)
| | config | throughput | MB/s | latency | max Δ latest / 7d |
|---|---|---:|---:|---:|---:|
| 🔴 | bs=10 sw=10 sl=64 | 354 | 0.216 | 27,889/38,356/38,356 us | 🔴 +30.4% / 🔴 +150.2% |
| 🔴 | bs=100 sw=10 sl=64 | 760 | 0.464 | 130,366/150,822/150,822 us | 🔴 +13.0% / 🔴 +39.2% |
| ⚪ | bs=1000 sw=10 sl=64 | 909 | 0.555 | 1,092,534/1,162,711/1,162,711 us | ⚪ within ±5% / 🔴 +12.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 | 354 tuples/sec | 415 tuples/sec | 772.08 tuples/sec | -14.7% | -54.2% |
| bs=10 sw=10 sl=64 | MB/s | 0.216 MB/s | 0.254 MB/s | 0.471 MB/s | -15.0% | -54.2% |
| bs=10 sw=10 sl=64 | p50 | 27,889 us | 23,551 us | 12,745 us | +18.4% | +118.8% |
| bs=10 sw=10 sl=64 | p95 | 38,356 us | 29,410 us | 15,330 us | +30.4% | +150.2% |
| bs=10 sw=10 sl=64 | p99 | 38,356 us | 29,410 us | 19,054 us | +30.4% | +101.3% |
| bs=100 sw=10 sl=64 | throughput | 760 tuples/sec | 825 tuples/sec | 982.64 tuples/sec | -7.9% | -22.7% |
| bs=100 sw=10 sl=64 | MB/s | 0.464 MB/s | 0.503 MB/s | 0.6 MB/s | -7.8% | -22.6% |
| bs=100 sw=10 sl=64 | p50 | 130,366 us | 121,382 us | 101,961 us | +7.4% | +27.9% |
| bs=100 sw=10 sl=64 | p95 | 150,822 us | 133,484 us | 108,335 us | +13.0% | +39.2% |
| bs=100 sw=10 sl=64 | p99 | 150,822 us | 133,484 us | 114,379 us | +13.0% | +31.9% |
| bs=1000 sw=10 sl=64 | throughput | 909 tuples/sec | 908 tuples/sec | 1,013 tuples/sec | +0.1% | -10.3% |
| bs=1000 sw=10 sl=64 | MB/s | 0.555 MB/s | 0.554 MB/s | 0.618 MB/s | +0.2% | -10.3% |
| bs=1000 sw=10 sl=64 | p50 | 1,092,534 us | 1,100,008 us | 993,573 us | -0.7% | +10.0% |
| bs=1000 sw=10 sl=64 | p95 | 1,162,711 us | 1,133,932 us | 1,032,489 us | +2.5% | +12.6% |
| bs=1000 sw=10 sl=64 | p99 | 1,162,711 us | 1,133,932 us | 1,065,526 us | +2.5% | +9.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,564.63,200,128000,354,0.216,27889.00,38355.95,38355.95
1,100,10,64,20,2630.69,2000,1280000,760,0.464,130365.93,150822.33,150822.33
2,1000,10,64,20,22004.77,20000,12800000,909,0.555,1092533.74,1162711.24,1162711.24
```
</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): fill uncovered branches in source/scan and projection descriptors [texera]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #6100:
URL: https://github.com/apache/texera/pull/6100#issuecomment-4881358930
## [Codecov](https://app.codecov.io/gh/apache/texera/pull/6100?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 ([`b300716`](https://app.codecov.io/gh/apache/texera/commit/b3007162d61a7ef6bbadd59ec62d3212e15599af?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 #6100 +/- ##
=========================================
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/6100/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/6100/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/6100/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/6100/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/6100/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/6100/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/6100/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/6100/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/6100/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/6100/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/6100/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/6100?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): fill uncovered branches in source/scan and projection descriptors [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6100:
URL: https://github.com/apache/texera/pull/6100#issuecomment-4881353885
<!-- 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): fill uncovered branches in source/scan and projection descriptors [texera]
Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan commented on code in PR #6100:
URL: https://github.com/apache/texera/pull/6100#discussion_r3522942421
##########
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/source/scan/text/TextInputSourceOpDescSpec.scala:
##########
@@ -180,4 +182,29 @@ class TextInputSourceOpDescSpec extends AnyFlatSpec with BeforeAndAfter {
val path: Path = Paths.get(filePath)
new String(Files.readAllBytes(path), StandardCharsets.UTF_8)
}
+
+ "TextInputSourceOpDesc.getPhysicalOp" should
+ "wire the TextInputSourceOpExec class as a source op with one output port" in {
+ val physical =
+ textInputSourceOpDesc.getPhysicalOp(WorkflowIdentity(1L), ExecutionIdentity(1L))
+ physical.opExecInitInfo match {
+ case OpExecWithClassName(className, _) =>
+ assert(
+ className == "org.apache.texera.amber.operator.source.scan.text.TextInputSourceOpExec"
+ )
Review Comment:
Done — asserts `classOf[TextInputSourceOpExec].getName` instead of the hardcoded FQN string.
##########
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/source/scan/file/FileScanSourceOpDescSpec.scala:
##########
@@ -185,4 +188,39 @@ class FileScanSourceOpDescSpec extends AnyFlatSpec with BeforeAndAfter {
FileScanSourceOpExec.close()
}
+ "FileScanSourceOpDesc.getPhysicalOp" should
+ "wire the FileScanSourceOpExec class as a source op and propagate its schema" in {
+ val physical =
+ fileScanSourceOpDesc.getPhysicalOp(WorkflowIdentity(1L), ExecutionIdentity(1L))
+ physical.opExecInitInfo match {
+ case OpExecWithClassName(className, descString) =>
+ assert(
+ className == "org.apache.texera.amber.operator.source.scan.file.FileScanSourceOpExec"
+ )
+ assert(descString.nonEmpty)
Review Comment:
Done — asserts `classOf[FileScanSourceOpExec].getName`.
##########
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/source/scan/file/FileScanOpDescSpec.scala:
##########
@@ -96,4 +98,24 @@ class FileScanOpDescSpec extends AnyFlatSpec with BeforeAndAfter {
assert(processedTuple.getField[String]("filename") == inputFilePath)
fileScanOpExec.close()
}
+
+ "FileScanOpDesc.getPhysicalOp" should
+ "wire the FileScanOpExec class with one input port and one output port" in {
+ val physical = fileScanOpDesc.getPhysicalOp(WorkflowIdentity(1L), ExecutionIdentity(1L))
+ physical.opExecInitInfo match {
+ case OpExecWithClassName(className, payload) =>
+ assert(className == "org.apache.texera.amber.operator.source.scan.file.FileScanOpExec")
+ assert(payload.nonEmpty)
Review Comment:
Done — asserts `classOf[FileScanOpExec].getName`.
##########
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/projection/ProjectionOpDescSpec.scala:
##########
@@ -110,4 +116,24 @@ class ProjectionOpDescSpec extends AnyFlatSpec with BeforeAndAfter {
}
+ it should "preserve a HashPartition when its attributes are non-empty" in {
+ val out = projectionOpDesc.derivePartition()(List(HashPartition(List("field1"))))
+ assert(out == HashPartition(List("field1")))
+ }
+
+ it should "downgrade an empty HashPartition to UnknownPartition" in {
+ val out = projectionOpDesc.derivePartition()(List(HashPartition(List.empty)))
+ assert(out == UnknownPartition())
+ }
+
+ it should "preserve a RangePartition when its attributes are non-empty" in {
+ val out = projectionOpDesc.derivePartition()(List(RangePartition(List("field2"), 0L, 100L)))
+ assert(out == RangePartition(List("field2"), 0L, 100L))
+ }
+
+ it should "pass through partitions that are neither hash nor range" in {
+ val out = projectionOpDesc.derivePartition()(List(SinglePartition()))
+ assert(out == SinglePartition())
+ }
Review Comment:
Added an empty-RangePartition case. Note: RangePartition's companion `apply` already rewrites empty attributes to UnknownPartition, so an empty range never reaches the range arm's else — either way the result is UnknownPartition, which the new test documents.
--
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): fill uncovered branches in source/scan and projection descriptors [texera]
Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan merged PR #6100:
URL: https://github.com/apache/texera/pull/6100
--
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