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

Head commit for run:
f225ca57ef2222a1aa34b25f382daa6445a7a8ef / Kary Zheng 
<[email protected]>
feat(workflow-operator): read a column named in a different case the way the 
engine does (#9035)

### What changes were proposed in this PR?

The engine looks a column up through `Schema`, which ignores case. So a
setting that names `Name` reads the column `name`, and the workflow runs
in Texera. The exported script indexed the pandas frame with the name as
written and stopped with a `KeyError`.

`StandaloneCodeGenerator` gains `columnAsStored`, which resolves a
setting's column name against the input schema and returns the table's
spelling. A name the schema does not hold comes back unchanged, so the
script still fails where the run would. Seven operators read their
column through it: Projection, Filter, Keyword Search, Regular
Expression, Substring Search, Dictionary Matcher and Unnest String.
Projection still names each output column by its alias, which falls back
to the name as the setting writes it. That matches `ProjectionOpExec`.

Type Casting is the exception. Its schema propagation and its executor
both match the column by its exact name, so in the engine a unit whose
column differs in case casts nothing and the column passes through
unchanged. The export now skips that unit too, instead of raising a
`KeyError`.

Operators that run as Python in the engine already compare names exactly
on both sides, so they are left alone.

### Any related issues, documentation, discussions?

Closes #9004. @carloea2 found the mismatch while reviewing #8918.

#8980 rewrites Filter's export and looks up the declared type by the
column's name. Whichever of the two merges second should look that type
up under the resolved name as well.

### How was this PR tested?

Each of the eight operators' `OpDescSpec` gains a test with a setting in
a different case from the table. It asserts that the generated code
reads the table's spelling. For Type Casting, the test also checks that
the engine's output schema leaves that column's type unchanged, and that
the export skips the unit. All of `WorkflowOperator/test` passes. Merged
with the other open export PRs, the verification suite still passes all
150 cases (3 ignored, as before).

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

Generated-by: Claude Code (Claude Opus 5.5)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>

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

With regards,
GitHub Actions via GitBox

Reply via email to