kz930 opened a new pull request, #9035:
URL: https://github.com/apache/texera/pull/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)
   


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