xuang7 commented on code in PR #9209:
URL: https://github.com/apache/texera/pull/9209#discussion_r4620957033


##########
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/huggingFace/HuggingFaceSpamSMSDetectionOpDesc.scala:
##########
@@ -129,13 +133,12 @@ class HuggingFaceSpamSMSDetectionOpDesc
   override def getOutputSchemas(
       inputSchemas: Map[PortIdentity, Schema]
   ): Map[PortIdentity, Schema] = {
-    if (
-      resultAttributeSpam == null || resultAttributeSpam.trim.isEmpty ||
-      resultAttributeProbability == null || 
resultAttributeProbability.trim.isEmpty
-    )
-      return null
+    val inputSchema = inputSchemas(operatorInfo.inputPorts.head.id)
+    requireInputColumn(inputSchema, "Attribute", attribute)

Review Comment:
   Optional: the form restricts `attribute` to string columns for the three 
text operators (`attributeTypeRules`), but only Iris checks the column type 
here. A string check alongside `requireNumericInputColumn` would make the four 
consistent. Fine as a follow-up.



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