The GitHub Actions job "Benchmarks" on texera.git/main has succeeded.
Run started by GitHub user github-merge-queue[bot] (triggered by 
github-merge-queue[bot]).

Head commit for run:
4d7fd493a8f47b28cc2155bd79c946699cec89a1 / Kary Zheng 
<[email protected]>
feat(workflow-compiling-service): export a workflow as a standalone Python 
script (#8327)

### What changes were proposed in this PR?

A workflow can be built and read in the editor, but there is no form of
it that runs anywhere else. This adds one: given a plan, the compiling
service returns a single Python file that reads the same sources,
applies the same operators in the same order, and prints its results.

An operator says how it reads outside the engine by implementing
`StandaloneCodeGenerator`, returning a block of pandas that names its
inputs and outputs by position — `in1df`, `in2df`, `out1df`. The
translator walks the plan in topological order, gives every output port
a variable, substitutes those placeholders for the variables its
upstreams were given, and prints the leaves. Union takes the whole list
of upstreams rather than a fixed count, since any count an operator
states would be wrong for some workflow.

An operator that has no generator yet leaves a commented placeholder
rather than a line that looks like it works, so the export is useful
before every operator implements the trait.

Five operators implement it here to show the shape and to give the
translator something real to walk: Distinct, Filter, Limit, Projection
and Union. The rest of the operator set follows a family at a time.

### Any related issues, documentation, discussions?

Part of #8325, 1 of 26; that issue lists the set in order.

Closes #8407, the task this change is the whole of.

### How was this PR tested?

`WorkflowToPythonTranslatorSpec` covers what the translator does with a
plan: the topological order, the variable each port is given, the
placeholder substitution, the variadic port, and the operator that has
no generator. Each of the five operators asserts the block it emits in
its own spec.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 5)

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>

Report URL: https://github.com/apache/texera/actions/runs/34562576237

With regards,
GitHub Actions via GitBox

Reply via email to