PG1204 opened a new pull request, #7298:
URL: https://github.com/apache/texera/pull/7298

   ### What changes were proposed in this PR?
   
   If the HuggingFace operator's Result Column Name matches an existing input 
column, `getOutputSchemas` reached `Schema.add`, which threw a generic 
`RuntimeException("Attribute name '...' already exists in the schema")`, which 
is  unhelpful, and it doesn't tell the user what to do.
   
   This adds a pre-check in `getOutputSchemas`: if the resolved result column 
already exists in the input schema, it throws a clear, actionable message 
("Result column '...' already exists in the input table. Choose a different 
Result Column Name.") instead of the opaque internal error.
   
   ### Any related issues, documentation, discussions?
   
   Closes #7198.
   
   ### How was this PR tested?
   
   `sbt "WorkflowOperator/testOnly 
org.apache.texera.amber.operator.huggingFace.*"`: passes (124 tests). Added a 
test that a colliding result column produces the clear "Result column '...'" 
error. scalafmt clean.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   This PR was co-authored with Claude Opus 4.8 in compliance with ASF policy.
   


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