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

   ### What changes were proposed in this PR?
   
   `HuggingFaceSpamSMSDetectionOpDesc.getOutputSchemas` was the only one of the 
four legacy Hugging Face operators that neither validated its result-attribute 
names nor keyed the input schema by port id.
   
   `getOutputSchemas` is called as the user configures an operator, so it needs 
an answer for "not filled in yet". `HuggingFaceSentimentAnalysisOpDesc` and 
`HuggingFaceIrisLogisticRegressionOpDesc` answer by returning `null`; this 
operator instead passed the unset name straight into `Schema.add`. It now 
returns `null` when either `resultAttributeSpam` or 
`resultAttributeProbability` is null or blank, matching its siblings.
   
   The input schema is also now read as 
`inputSchemas(operatorInfo.inputPorts.head.id)` rather than 
`inputSchemas.values.head`, consistent with the sibling operators. With a 
single input port these are equivalent, so this is a consistency change rather 
than a behavioral fix.
   
   Unifying the error contract across all four legacy operators, two return 
`null`, one throws, this one did neither — is a broader question and is not 
attempted here.
   
   ### Any related issues?
   
   Closes #8482
   
   ### How was this PR tested?
   
   347 tests pass across the `huggingFace` and operator-metadata suites, and 
`scalafmtCheck` is clean for main and test sources. Two tests were added to 
`HuggingFaceSpamSMSDetectionOpDescSpec` covering an unset and a blank name for 
both result attributes. Reverting the operator change and re-running makes 
exactly those two tests fail, confirming they exercise the fix; the existing 
happy-path test already keys the input schema by the declared input port, so it 
covers the lookup change.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Yes, this PR was co-authored with Claude 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