You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "Ma77Ball (via GitHub)" <gi...@apache.org> on 2026/05/10 03:40:30 UTC
[PR] rename __internal_is_source to _internal_is_source so SourceOperator'… [texera]
Ma77Ball opened a new pull request, #5007:
URL: https://github.com/apache/texera/pull/5007
### What changes were proposed in this PR?
Fixes a name-mangling bug in amber/src/main/python/core/models/operator.py.
Operator declared __internal_is_source (double underscore), which Python rewrites per class. So SourceOperator.__internal_is_source = True was stored as _SourceOperator__internal_is_source, while the property kept reading _Operator__internal_is_source. Result: SourceOperator subclasses defaulted to is_source = False, and only worked because ExecutorManager called the setter afterward.
Fix: rename to _internal_is_source (single underscore, no mangling) in Operator's class attribute, getter, setter, and SourceOperator's override. Also removed a dead, mangled line in TableOperator.__init__.
### Any related issues, documentation, or discussions?
Closes: #4736
### How was this PR tested?
Updated amber/src/test/python/core/models/test_operator.py:
- Removed the bug-pinning test that asserted on the old mangled attribute names.
- Removed the xfail marker from the contract test, which now passes: SourceOperator() reports is_source is True.
All 29 tests in test_operator.py pass.
### Was this PR authored or co-authored using generative AI tooling?
Co-authored with Claude Opus 4.7 in Compliance with ASF
--
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] fix: SourceOperator is_source default broken by name mangling [texera]
Posted by "Ma77Ball (via GitHub)" <gi...@apache.org>.
Ma77Ball commented on code in PR #5007:
URL: https://github.com/apache/texera/pull/5007#discussion_r3214477910
##########
amber/src/main/python/core/models/operator.py:
##########
@@ -164,7 +164,7 @@ def on_finish(self, port: int) -> Iterator[Optional[TupleLike]]:
class SourceOperator(TupleOperatorV2):
- __internal_is_source = True
Review Comment:
Python purposely makes it hard to access, as accessing these types of attribute names outside the class defeats the purpose of encapsulation.
--
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] fix: SourceOperator is_source default broken by name mangling [texera]
Posted by "Yicong-Huang (via GitHub)" <gi...@apache.org>.
Yicong-Huang merged PR #5007:
URL: https://github.com/apache/texera/pull/5007
--
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] fix: SourceOperator is_source default broken by name mangling [texera]
Posted by "Yicong-Huang (via GitHub)" <gi...@apache.org>.
Yicong-Huang commented on code in PR #5007:
URL: https://github.com/apache/texera/pull/5007#discussion_r3214457501
##########
amber/src/main/python/core/models/operator.py:
##########
@@ -164,7 +164,7 @@ def on_finish(self, port: int) -> Iterator[Optional[TupleLike]]:
class SourceOperator(TupleOperatorV2):
- __internal_is_source = True
Review Comment:
I still want it to be two underscores as prefix. Is it do able?
--
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] fix: SourceOperator is_source default broken by name mangling [texera]
Posted by "Yicong-Huang (via GitHub)" <gi...@apache.org>.
Yicong-Huang commented on code in PR #5007:
URL: https://github.com/apache/texera/pull/5007#discussion_r3215628785
##########
amber/src/main/python/core/models/operator.py:
##########
@@ -164,7 +164,7 @@ def on_finish(self, port: int) -> Iterator[Optional[TupleLike]]:
class SourceOperator(TupleOperatorV2):
- __internal_is_source = True
Review Comment:
Let's do it that way for now.
--
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] fix: SourceOperator is_source default broken by name mangling [texera]
Posted by "chenlica (via GitHub)" <gi...@apache.org>.
chenlica commented on PR #5007:
URL: https://github.com/apache/texera/pull/5007#issuecomment-4414462092
@Xiao-zhen-Liu Please review it.
--
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] fix: SourceOperator is_source default broken by name mangling [texera]
Posted by "Ma77Ball (via GitHub)" <gi...@apache.org>.
Ma77Ball commented on code in PR #5007:
URL: https://github.com/apache/texera/pull/5007#discussion_r3214473905
##########
amber/src/main/python/core/models/operator.py:
##########
@@ -164,7 +164,7 @@ def on_finish(self, port: int) -> Iterator[Optional[TupleLike]]:
class SourceOperator(TupleOperatorV2):
- __internal_is_source = True
Review Comment:
Only if the variable ends in double underline, e.g., --> `__internal_is_source__`
--
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] fix: SourceOperator is_source default broken by name mangling [texera]
Posted by "Ma77Ball (via GitHub)" <gi...@apache.org>.
Ma77Ball commented on code in PR #5007:
URL: https://github.com/apache/texera/pull/5007#discussion_r3215501682
##########
amber/src/main/python/core/models/operator.py:
##########
@@ -164,7 +164,7 @@ def on_finish(self, port: int) -> Iterator[Optional[TupleLike]]:
class SourceOperator(TupleOperatorV2):
- __internal_is_source = True
Review Comment:
There is no way to change how Python handles mangled classes to make this work. However we can just literally spell the mangled name _Operator__internal_is_source = True in SourceOperator. If this is preferred, I can add the change.
--
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] fix: SourceOperator is_source default broken by name mangling [texera]
Posted by "Ma77Ball (via GitHub)" <gi...@apache.org>.
Ma77Ball commented on PR #5007:
URL: https://github.com/apache/texera/pull/5007#issuecomment-4416640146
@Yicong-Huang I added the fix, changed the pr description, and ran the test to make sure it passes.
--
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] rename __internal_is_source to _internal_is_source so SourceOperator'… [texera]
Posted by "Ma77Ball (via GitHub)" <gi...@apache.org>.
Ma77Ball commented on PR #5007:
URL: https://github.com/apache/texera/pull/5007#issuecomment-4414358516
/request-review @aglinxinyuan
--
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] fix: SourceOperator is_source default broken by name mangling [texera]
Posted by "Yicong-Huang (via GitHub)" <gi...@apache.org>.
Yicong-Huang commented on code in PR #5007:
URL: https://github.com/apache/texera/pull/5007#discussion_r3215330712
##########
amber/src/main/python/core/models/operator.py:
##########
@@ -164,7 +164,7 @@ def on_finish(self, port: int) -> Iterator[Optional[TupleLike]]:
class SourceOperator(TupleOperatorV2):
- __internal_is_source = True
Review Comment:
yes that's the purpose of using two underscores. I hope to prevent this field from being accessed. but source operator this field should be set to True. can we find a compromise between those requirements?
--
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] fix: SourceOperator is_source default broken by name mangling [texera]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #5007:
URL: https://github.com/apache/texera/pull/5007#issuecomment-4414668513
## [Codecov](https://app.codecov.io/gh/apache/texera/pull/5007?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 43.22%. Comparing base ([`410c700`](https://app.codecov.io/gh/apache/texera/commit/410c700bb524d6fe13a0c0fd89a21dfc86373cb0?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`9031818`](https://app.codecov.io/gh/apache/texera/commit/9031818f3bc39ca7184ad3dcfeb93a189052f602?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 #5007 +/- ##
============================================
- Coverage 43.22% 43.22% -0.01%
Complexity 2183 2183
============================================
Files 1035 1035
Lines 38814 38813 -1
Branches 4061 4061
============================================
- Hits 16777 16776 -1
Misses 20985 20985
Partials 1052 1052
```
| [Flag](https://app.codecov.io/gh/apache/texera/pull/5007/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/5007/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `39.53% <ø> (ø)` | | Carriedforward from [410c700](https://app.codecov.io/gh/apache/texera/commit/410c700bb524d6fe13a0c0fd89a21dfc86373cb0?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/5007/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `33.72% <ø> (ø)` | | Carriedforward from [410c700](https://app.codecov.io/gh/apache/texera/commit/410c700bb524d6fe13a0c0fd89a21dfc86373cb0?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/5007/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `43.23% <ø> (ø)` | | Carriedforward from [410c700](https://app.codecov.io/gh/apache/texera/commit/410c700bb524d6fe13a0c0fd89a21dfc86373cb0?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/5007/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 [410c700](https://app.codecov.io/gh/apache/texera/commit/410c700bb524d6fe13a0c0fd89a21dfc86373cb0?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/5007/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 [410c700](https://app.codecov.io/gh/apache/texera/commit/410c700bb524d6fe13a0c0fd89a21dfc86373cb0?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/5007/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `32.18% <ø> (ø)` | | Carriedforward from [410c700](https://app.codecov.io/gh/apache/texera/commit/410c700bb524d6fe13a0c0fd89a21dfc86373cb0?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/5007/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `34.80% <ø> (ø)` | | Carriedforward from [410c700](https://app.codecov.io/gh/apache/texera/commit/410c700bb524d6fe13a0c0fd89a21dfc86373cb0?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [python](https://app.codecov.io/gh/apache/texera/pull/5007/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `88.89% <100.00%> (-0.01%)` | :arrow_down: | |
| [workflow-compiling-service](https://app.codecov.io/gh/apache/texera/pull/5007/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `47.72% <ø> (ø)` | | Carriedforward from [410c700](https://app.codecov.io/gh/apache/texera/commit/410c700bb524d6fe13a0c0fd89a21dfc86373cb0?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 Sentry](https://app.codecov.io/gh/apache/texera/pull/5007?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>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :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