The GitHub Actions job "Required Checks" on 
texera.git/gh-readonly-queue/main/pr-8502-4d7fd493a8f47b28cc2155bd79c946699cec89a1
 has succeeded.
Run started by GitHub user aglinxinyuan (triggered by aglinxinyuan).

Head commit for run:
75c85aa7e771d9b3d3c79396b08b196928238858 / Kary Zheng 
<[email protected]>
feat(workflow-operator): export the first five operators, and serve the script 
(#8502)

### What changes were proposed in this PR?

Five operators implement `StandaloneCodeGenerator`, which is what turns
the translator from a mechanism into something that produces a script
that runs: Distinct, Filter, Limit, Projection and Union. Four of them
read a single input; Union reads a variadic port, so it names the whole
list of upstreams rather than a fixed count, which a fixed count gets
wrong in both directions.

The endpoint the editor calls comes with them, because what it is worth
testing on is a script that runs rather than one made of placeholders.
It takes a plan, compiles it first so a scan source can read the schema
off the file it points at, hands the translator the output schemas that
gives, and returns the script. A failed compile is logged and
translation goes on without them, so a workflow whose file is not chosen
yet still exports.

`pyStringLiteral` comes with them too. A generator has to write a column
name into the source it emits, and writing the quotes by hand lets any
quote, backslash or newline in the name close the literal early and
change, or break, the emitted program.

#8327 is the trait and the translator, and nothing that uses them.

### Any related issues, documentation, discussions?

Part of #8325, 2 of 27; that issue lists the set in order.

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

### How was this PR tested?

Each operator asserts the block it emits in its own spec.
`PythonTemplateBuilderApiSpec` covers what `pyStringLiteral` escapes,
including the NUL that Python refuses to compile anywhere in a source
file. `WorkflowToPythonResourceSpec` drives the endpoint over a plan
built from these operators and reads the script back.

### 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)

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

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

With regards,
GitHub Actions via GitBox

Reply via email to