You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "kz930 (via GitHub)" <gi...@apache.org> on 2026/09/10 22:22:33 UTC
[PR] feat(python): give a port that carried no rows its declared columns [texera]
kz930 opened a new pull request, #8488:
URL: https://github.com/apache/texera/pull/8488
### What changes were proposed in this PR?
The runtime now tells an executor what each input port was declared to carry, and `TableOperator` falls back to that when a port finishes with no rows.
`Operator` gains an `input_schemas` mapping, keyed by port index. `DataProcessor` writes the finishing port's schema into it just before calling `on_finish`, reading it from the input manager's own port; a source has no input port to ask, so it is left alone. `TableOperator.on_finish` uses it only when there are no tuples to read column names off, which is the only case where the tuples do not already say the same thing. `Table.empty_of` builds that frame through Arrow, so each column carries the dtype it would have had with rows in it rather than object.
### Any related issues, documentation, discussions?
Closes #8487
### How was this PR tested?
A new case in `TestTableOperator`, `test_on_finish_with_no_rows_keeps_the_declared_columns`, gives a port an INTEGER and a STRING column, finishes it with no rows, and asserts the operator receives both columns, an empty frame, and `int32` for the integer one. Removing the fallback turns it red on the missing columns.
The rest of `amber/src/test/python/core` passes unchanged, 1107 tests. The one failure is `test_iceberg_rest_catalog_integration`, which needs a running catalog and fails the same way without this change.
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 5)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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] feat(python): give a port that carried no rows its declared columns [texera]
Posted by "kz930 (via GitHub)" <gi...@apache.org>.
kz930 commented on PR #8488:
URL: https://github.com/apache/texera/pull/8488#issuecomment-5768327208
Even if the filter returns zero rows, the input port still has a declared schema. So the result should be an empty table with the same columns, rather than a table with zero columns. Otherwise, a downstream Sort on age fails simply because the filter happened to match no rows.
--
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] feat(python): give a port that carried no rows its declared columns [texera]
Posted by "carloea2 (via GitHub)" <gi...@apache.org>.
carloea2 commented on PR #8488:
URL: https://github.com/apache/texera/pull/8488#issuecomment-5769248404
> It is supposed to fail. By design, the Sort operator cannot process an empty table. If it needs to support empty tables, it should be modified to accept an empty table without a schema. A schema belongs to a table containing data; an empty table should not have one.
Why can't an empty table have a schema?
--
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] feat(python): give a port that carried no rows its declared columns [texera]
Posted by "kz930 (via GitHub)" <gi...@apache.org>.
kz930 closed pull request #8488: feat(python): give a port that carried no rows its declared columns
URL: https://github.com/apache/texera/pull/8488
--
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] feat(python): give a port that carried no rows its declared columns [texera]
Posted by "kz930 (via GitHub)" <gi...@apache.org>.
kz930 commented on PR #8488:
URL: https://github.com/apache/texera/pull/8488#issuecomment-5630189935
/request-review @carloea2
--
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] feat(python): give a port that carried no rows its declared columns [texera]
Posted by "carloea2 (via GitHub)" <gi...@apache.org>.
carloea2 commented on code in PR #8488:
URL: https://github.com/apache/texera/pull/8488#discussion_r3993441924
##########
amber/src/main/python/core/models/table.py:
##########
@@ -25,6 +26,20 @@
class Table(pandas.DataFrame):
+ @staticmethod
+ def empty_of(schema) -> pandas.DataFrame:
+ """
+ The declared columns with no rows under them.
+
+ ``from_tuple_likes`` reads the column names off the tuples it is given,
+ so with none to read it produces a frame of no columns at all, and an
+ operator naming any of its own columns raises KeyError. A port that
+ carried no rows still has a schema, and this is what it looks like as a
+ table. Building it through Arrow gives each column the dtype it would
+ have had with rows in it.
+ """
+ return pa.Table.from_pylist([], schema=schema.as_arrow_schema()).to_pandas()
Review Comment:
Could this return a Table rather than a plain DataFrame? A TableOperator UDF using `yield from table.as_tuples()` now raises AttributeError when its input is empty and has a declared schema. The same UDF still works with populated input and with the previous empty-input path. I reproduced this against 2004373 with three local pytest cases: those two controls pass, while the declared empty input fails. Wrapping the frame in Table would preserve the existing UDF API while keeping the columns.
--
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] feat(python): give a port that carried no rows its declared columns [texera]
Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan commented on PR #8488:
URL: https://github.com/apache/texera/pull/8488#issuecomment-5767738129
Can you come up with an example to explain why is this PR needed?
--
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] feat(python): give a port that carried no rows its declared columns [texera]
Posted by "kz930 (via GitHub)" <gi...@apache.org>.
kz930 commented on PR #8488:
URL: https://github.com/apache/texera/pull/8488#issuecomment-5627932047
Carlos, this one is a platform bug rather than an export change: a port that finishes having carried no rows hands a table operator a frame with no columns at all, so every operator naming one of its own columns raises KeyError. Would you take a look when you have a moment?
--
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] feat(python): give a port that carried no rows its declared columns [texera]
Posted by "carloea2 (via GitHub)" <gi...@apache.org>.
carloea2 commented on code in PR #8488:
URL: https://github.com/apache/texera/pull/8488#discussion_r4001987438
##########
amber/src/main/python/core/models/table.py:
##########
@@ -25,6 +26,20 @@
class Table(pandas.DataFrame):
+ @staticmethod
+ def empty_of(schema) -> pandas.DataFrame:
+ """
+ The declared columns with no rows under them.
+
+ ``from_tuple_likes`` reads the column names off the tuples it is given,
+ so with none to read it produces a frame of no columns at all, and an
+ operator naming any of its own columns raises KeyError. A port that
+ carried no rows still has a schema, and this is what it looks like as a
+ table. Building it through Arrow gives each column the dtype it would
+ have had with rows in it.
+ """
+ return pa.Table.from_pylist([], schema=schema.as_arrow_schema()).to_pandas()
Review Comment:
Retested 90e381a. All three local pytest cases pass, including as_tuples on declared empty input. This finding is fixed.
--
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] feat(python): give a port that carried no rows its declared columns [texera]
Posted by "kz930 (via GitHub)" <gi...@apache.org>.
kz930 commented on code in PR #8488:
URL: https://github.com/apache/texera/pull/8488#discussion_r3995635279
##########
amber/src/main/python/core/models/table.py:
##########
@@ -25,6 +26,20 @@
class Table(pandas.DataFrame):
+ @staticmethod
+ def empty_of(schema) -> pandas.DataFrame:
+ """
+ The declared columns with no rows under them.
+
+ ``from_tuple_likes`` reads the column names off the tuples it is given,
+ so with none to read it produces a frame of no columns at all, and an
+ operator naming any of its own columns raises KeyError. A port that
+ carried no rows still has a schema, and this is what it looks like as a
+ table. Building it through Arrow gives each column the dtype it would
+ have had with rows in it.
+ """
+ return pa.Table.from_pylist([], schema=schema.as_arrow_schema()).to_pandas()
Review Comment:
Good catch. `empty_of` now returns a `Table` rather than the plain frame Arrow builds, so `as_tuples()` keeps working on an empty declared input, and the existing test asserts both.
--
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] feat(python): give a port that carried no rows its declared columns [texera]
Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan commented on PR #8488:
URL: https://github.com/apache/texera/pull/8488#issuecomment-5771378448
> Makes sense, I'll drop this. Before I close it: under that design, should a port that carried no rows fail the run as it does today, or should the engine simply not call `process_table` for it and finish the port quietly? Both fit "an empty table has no schema", but only the second keeps a workflow alive when a filter happens to match nothing.
Either way is fine. However, making `filter` work with an empty table is not, by itself, a reason to add a schema to empty tables.
--
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] feat(python): give a port that carried no rows its declared columns [texera]
Posted by "kz930 (via GitHub)" <gi...@apache.org>.
kz930 commented on PR #8488:
URL: https://github.com/apache/texera/pull/8488#issuecomment-5769089562
Makes sense, I'll drop this. Before I close it: under that design, should a port that carried no rows fail the run as it does today, or should the engine simply not call `process_table` for it and finish the port quietly? Both fit "an empty table has no schema", but only the second keeps a workflow alive when a filter happens to match nothing.
--
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] feat(python): give a port that carried no rows its declared columns [texera]
Posted by "kz930 (via GitHub)" <gi...@apache.org>.
kz930 commented on PR #8488:
URL: https://github.com/apache/texera/pull/8488#issuecomment-5738920185
You are right, and the empty port was not just mislabelled: it was never finished at all, since the first port's id stood in for it. A marker's port is now read off the channel it arrived on, which is the channel the alignment waited on, and `test_second_input_port_with_no_rows_finishes_as_itself` gives port 0 a row and port 1 nothing, then checks each port is finished as itself and with its declared columns.
--
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] feat(python): give a port that carried no rows its declared columns [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8488:
URL: https://github.com/apache/texera/pull/8488#issuecomment-5626293600
<!-- texera-benchmarks-comment -->
## ⚠️ Benchmark changes need a look
🟢 2 better · 🔴 4 worse · ⚪ 9 noise (<±5%) · 0 without baseline
> Compared against main `1fbd346` 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/34537125063)
| | config | throughput | MB/s | latency | max Δ latest / 7d |
|---|---|---:|---:|---:|---:|
| 🔴 | bs=10 sw=10 sl=64 | 345 | 0.21 | 27,914/38,715/38,715 us | 🔴 +20.0% / 🔴 +140.0% |
| 🔴 | bs=100 sw=10 sl=64 | 774 | 0.472 | 128,505/153,463/153,463 us | 🟢 -7.5% / 🔴 +41.2% |
| ⚪ | bs=1000 sw=10 sl=64 | 920 | 0.561 | 1,091,359/1,141,539/1,141,539 us | ⚪ within ±5% / 🔴 +10.0% |
<details><summary>Baseline details</summary>
Latest main `1fbd346` from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---:|---:|---:|---:|---:|
| bs=10 sw=10 sl=64 | throughput | 345 tuples/sec | 388 tuples/sec | 755.28 tuples/sec | -11.1% | -54.3% |
| bs=10 sw=10 sl=64 | MB/s | 0.21 MB/s | 0.237 MB/s | 0.461 MB/s | -11.4% | -54.4% |
| bs=10 sw=10 sl=64 | p50 | 27,914 us | 23,270 us | 12,957 us | +20.0% | +115.4% |
| bs=10 sw=10 sl=64 | p95 | 38,715 us | 39,438 us | 16,134 us | -1.8% | +140.0% |
| bs=10 sw=10 sl=64 | p99 | 38,715 us | 39,438 us | 20,333 us | -1.8% | +90.4% |
| bs=100 sw=10 sl=64 | throughput | 774 tuples/sec | 806 tuples/sec | 980.1 tuples/sec | -4.0% | -21.0% |
| bs=100 sw=10 sl=64 | MB/s | 0.472 MB/s | 0.492 MB/s | 0.598 MB/s | -4.1% | -21.1% |
| bs=100 sw=10 sl=64 | p50 | 128,505 us | 120,490 us | 101,894 us | +6.7% | +26.1% |
| bs=100 sw=10 sl=64 | p95 | 153,463 us | 165,976 us | 108,718 us | -7.5% | +41.2% |
| bs=100 sw=10 sl=64 | p99 | 153,463 us | 165,976 us | 122,482 us | -7.5% | +25.3% |
| bs=1000 sw=10 sl=64 | throughput | 920 tuples/sec | 915 tuples/sec | 1,011 tuples/sec | +0.5% | -9.0% |
| bs=1000 sw=10 sl=64 | MB/s | 0.561 MB/s | 0.558 MB/s | 0.617 MB/s | +0.5% | -9.1% |
| bs=1000 sw=10 sl=64 | p50 | 1,091,359 us | 1,090,198 us | 996,422 us | +0.1% | +9.5% |
| bs=1000 sw=10 sl=64 | p95 | 1,141,539 us | 1,152,241 us | 1,037,670 us | -0.9% | +10.0% |
| bs=1000 sw=10 sl=64 | p99 | 1,141,539 us | 1,152,241 us | 1,072,152 us | -0.9% | +6.5% |
</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,580.06,200,128000,345,0.210,27914.10,38714.64,38714.64
1,100,10,64,20,2583.98,2000,1280000,774,0.472,128504.72,153463.06,153463.06
2,1000,10,64,20,21742.96,20000,12800000,920,0.561,1091359.37,1141539.18,1141539.18
```
</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] feat(python): give a port that carried no rows its declared columns [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8488:
URL: https://github.com/apache/texera/pull/8488#issuecomment-5626231501
<!-- 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:** `@aglinxinyuan`, `@eugenegujing`
You can notify them by mentioning `@aglinxinyuan`, `@eugenegujing` 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] feat(python): give a port that carried no rows its declared columns [texera]
Posted by "kz930 (via GitHub)" <gi...@apache.org>.
kz930 commented on PR #8488:
URL: https://github.com/apache/texera/pull/8488#issuecomment-5628817729
@carloea2 this one is a platform bug rather than an export change: a port that finishes having carried no rows hands a table operator a frame with no columns at all, so every operator naming one of its own columns raises KeyError. Would you take a look when you have a moment?
--
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] feat(python): give a port that carried no rows its declared columns [texera]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #8488:
URL: https://github.com/apache/texera/pull/8488#issuecomment-5626276190
## [Codecov](https://app.codecov.io/gh/apache/texera/pull/8488?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 93.69%. Comparing base ([`1fbd346`](https://app.codecov.io/gh/apache/texera/commit/1fbd34627026c10e67a9c20a686e37e1f0b8d7f0?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`2004373`](https://app.codecov.io/gh/apache/texera/commit/200437316d3d5d3c5e0c3cc184218aac4bf80d36?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #8488 +/- ##
=========================================
Coverage 93.69% 93.69%
Complexity 4826 4826
=========================================
Files 1209 1209
Lines 49871 49890 +19
Branches 6099 6101 +2
=========================================
+ Hits 46727 46746 +19
Misses 1652 1652
Partials 1492 1492
```
| [Flag](https://app.codecov.io/gh/apache/texera/pull/8488/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/8488/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `80.18% <ø> (ø)` | | Carriedforward from [1fbd346](https://app.codecov.io/gh/apache/texera/commit/1fbd34627026c10e67a9c20a686e37e1f0b8d7f0?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/8488/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `99.32% <ø> (ø)` | | Carriedforward from [1fbd346](https://app.codecov.io/gh/apache/texera/commit/1fbd34627026c10e67a9c20a686e37e1f0b8d7f0?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/8488/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `89.91% <ø> (ø)` | | Carriedforward from [1fbd346](https://app.codecov.io/gh/apache/texera/commit/1fbd34627026c10e67a9c20a686e37e1f0b8d7f0?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/8488/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `77.14% <ø> (ø)` | | Carriedforward from [1fbd346](https://app.codecov.io/gh/apache/texera/commit/1fbd34627026c10e67a9c20a686e37e1f0b8d7f0?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/8488/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `87.12% <ø> (ø)` | | Carriedforward from [1fbd346](https://app.codecov.io/gh/apache/texera/commit/1fbd34627026c10e67a9c20a686e37e1f0b8d7f0?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [file-service](https://app.codecov.io/gh/apache/texera/pull/8488/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `83.65% <ø> (ø)` | | Carriedforward from [1fbd346](https://app.codecov.io/gh/apache/texera/commit/1fbd34627026c10e67a9c20a686e37e1f0b8d7f0?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/8488/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `96.16% <ø> (ø)` | | Carriedforward from [1fbd346](https://app.codecov.io/gh/apache/texera/commit/1fbd34627026c10e67a9c20a686e37e1f0b8d7f0?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/8488/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `83.73% <ø> (ø)` | | Carriedforward from [1fbd346](https://app.codecov.io/gh/apache/texera/commit/1fbd34627026c10e67a9c20a686e37e1f0b8d7f0?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/8488/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `98.48% <100.00%> (+<0.01%)` | :arrow_up: | |
| [workflow-compiling-service](https://app.codecov.io/gh/apache/texera/pull/8488/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `77.19% <ø> (ø)` | | Carriedforward from [1fbd346](https://app.codecov.io/gh/apache/texera/commit/1fbd34627026c10e67a9c20a686e37e1f0b8d7f0?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/8488?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] feat(python): give a port that carried no rows its declared columns [texera]
Posted by "kz930 (via GitHub)" <gi...@apache.org>.
kz930 commented on PR #8488:
URL: https://github.com/apache/texera/pull/8488#issuecomment-5768210890
Any workflow where a downstream operator receives no rows. Scan a CSV, put a Filter after it whose condition matches nothing (`age > 200`), and send that into a Sort on `age`. The Sort worker fails with `KeyError: 'age'` instead of finishing with an empty result, because `TableOperator.on_finish` reads the column names off the tuples the port carried, and with no tuples it hands `process_table` a frame of zero columns. With this change the port's declared schema supplies the columns, so Sort sorts an empty table that still has `age` in it and the run completes. The same holds for the visualization operators and for any user-written `UDFTableOperator` that names a column.
--
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] feat(python): give a port that carried no rows its declared columns [texera]
Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan commented on PR #8488:
URL: https://github.com/apache/texera/pull/8488#issuecomment-5768236847
I think that’s the expected behavior. You can’t apply a filter to an empty table, and the error message is accurate. The schema is associated with the table, so if there is no table, there is no schema.
--
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] feat(python): give a port that carried no rows its declared columns [texera]
Posted by "kz930 (via GitHub)" <gi...@apache.org>.
kz930 commented on PR #8488:
URL: https://github.com/apache/texera/pull/8488#issuecomment-5785306387
Closing this. Whether a zero-row table carries its declared columns is a semantic decision for every table operator, and the case for changing it isn't made by one workflow breaking, so I'm leaving the behavior as it is.
--
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] feat(python): give a port that carried no rows its declared columns [texera]
Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan commented on PR #8488:
URL: https://github.com/apache/texera/pull/8488#issuecomment-5771364083
> > It is supposed to fail. By design, the Sort operator cannot process an empty table. If it needs to support empty tables, it should be modified to accept an empty table without a schema. A schema belongs to a table containing data; an empty table should not have one.
>
> Why can't an empty table have a schema?
I see an empty table as analogous to `null`: can a `null` value have a data type? If you instead treat an empty table like an empty string, then it could have a schema. However, supporting an empty string instead of `null` often feels somewhat hacky.
In short, there may be valid arguments both for and against allowing an empty table to have a schema. Since this would be an important semantic change, I think it should be decided through a broader discussion rather than as part of this specific fix.
--
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] feat(python): give a port that carried no rows its declared columns [texera]
Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan commented on PR #8488:
URL: https://github.com/apache/texera/pull/8488#issuecomment-5768420751
It is supposed to fail. By design, the Sort operator cannot process an empty table. If it needs to support empty tables, it should be modified to accept an empty table without a schema. A schema belongs to a table containing data; an empty table should not have one.
--
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