kz930 opened a new pull request, #8502:
URL: https://github.com/apache/texera/pull/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.
   
   This was split out of #8327 on review: that change is the trait and the 
translator, and nothing that uses them.
   
   ### Any related issues, documentation, discussions?
   
   Part of #8325, 2 of 26; 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)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to