Repository navigation
Add PyWayang load_collection using literal JSON input - #870
Open
Kaileshwar16 wants to merge 2 commits into
Open
Kaileshwar16 wants to merge 2 commits into
Kaileshwar16 wants to merge 2 commits into
Conversation
Kaileshwar16
added a commit
to Kaileshwar16/wayang
that referenced
this pull request
Nov 8, 2026
Derive serialized output connections from the selected plan's inputs so collecting an earlier branch still works after another consumer is attached. Add client, worker, Scala result conversion, and real backend regression coverage, and document how to run the collection tests. Refs apache#869; follow-up to apache#870.
zkaoudi
requested changes
Nov 12, 2026
| assert data.operator.inputs == 0 | ||
| assert data.operator.outputs == 1 | ||
|
|
||
| with patch("pywy.core.core.requests.post") as post: |
Contributor
Author
There was a problem hiding this comment.
the patch mocks requests.post so this unit test can inspect the generated JSON plan without needing a running REST server. Separate integration tests send real requests to the Wayang backend and verify the output files. I’ve added a comment explaining this and an assertion that exactly one request is submitted.
| `WAYANG_API_URL`, or `WAYANG_API_HOST` and `WAYANG_API_PORT`. | ||
|
|
||
| ## In-memory collections | ||
|
|
Contributor
There was a problem hiding this comment.
That's a very long README addition for just a load collection operator.
| .store_textfile("file:///tmp/doubled.txt")) | ||
| ``` | ||
|
|
||
| This example uses the existing fusion of adjacent Python transformations into |
Contributor
There was a problem hiding this comment.
for example, this has to do with your implementation and should not be part of README
| self.values = self._snapshot(collection, set(), "collection") | ||
|
|
||
| @staticmethod | ||
| def _snapshot(value, ancestors, path): |
Contributor
There was a problem hiding this comment.
can you add support to handle NumPy values?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements the load_collection() part of #869, allowing Python users to create a DataQuanta from an in-memory list or tuple.
It reuses the existing JSON execution pipeline, preserves compatibility with legacy collection plans, and validates supported values before submission.
Regression tests cover empty and nested collections, unsupported values, serialization, and real backend file output. The Python suite, Scala collection tests, and Java 17 reactor build pass. collect()
ML-specific functionality remain outside this PR’s scope.
the next part of it should be to implement DataQuanta.collect() to return execution results as a Python list