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

Head commit for run:
bf930b7a3b085da4732d21192a9ce0371baeff65 / Kary Zheng 
<[email protected]>
test(verify): run a Python operator the way the engine runs it (#8357)

### What changes were proposed in this PR?

A Python operator is not called; it is handed to an interpreter that
imports
the generated module and drives it through the same open, process and
close
the engine uses. `PyOpExecHarness` writes that module, starts the
driver, and
reads back what the operator emitted.

The driver is the engine's side of the contract written out plainly: it
is
what makes the answer this side produces the engine's answer rather than
an
approximation of it.

A timestamp reaches the operator the way the engine hands one to a
Python worker: a naive datetime at microsecond resolution. It is read
without pandas, so a year past 2262 arrives intact. That is the zoneless
microsecond Arrow type #8704 makes the engine send.

A port that carried no rows reaches the operator with its declared
columns, as #8766 makes the engine hand them. The driver declares each
input port's schema right before that port finishes, where the worker
does.

Eight lines of `build.sbt` are unrelated to the export and fixed while
this change is in the file: File Service's test grouping read its fork
options inside the lambda, which sbt hoists anyway, so the warning it
printed on every build said the code meant something it did not.

### Any related issues, documentation, discussions?

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

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

### How was this PR tested?

The tests in this change cover it. `PyOpExecHarnessSpec` also checks
that a row the output schema does not describe is refused. It also
checks that `2500-01-01 00:00:00.123456789` reaches the operator as
`2500-01-01 00:00:00.123456`. It also checks that a port that carried no
rows hands the operator its declared columns. Without the driver's
change the operator sees a table with no columns. The whole set is
exercised together once the last piece lands: every operator run through
the engine and through its generated script, and the two answers
compared.

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

Generated-by: Claude Code (Claude Opus 5, Claude Opus 5.5)

---------

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

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

With regards,
GitHub Actions via GitBox

Reply via email to