carloea2 commented on code in PR #8918:
URL: https://github.com/apache/texera/pull/8918#discussion_r4225178313


##########
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/sklearn/SklearnPredictionOpDesc.scala:
##########
@@ -92,8 +92,11 @@ class SklearnPredictionOpDesc extends 
PythonOperatorDescriptor with StandaloneCo
     var resultType = AttributeType.STRING
     val inputSchema = inputSchemas(operatorInfo.inputPorts(1).id)
     if (groundTruthAttribute != "") {
-      resultType =
-        inputSchema.attributes.find(attr => attr.getName == 
groundTruthAttribute).get.getType
+      if (!inputSchema.containsAttribute(groundTruthAttribute))

Review Comment:
   Please keep the exact-case lookup here. With input column `label` and 
configured name `Label`, schema validation now succeeds because 
containsAttribute ignores case. The generated script then fails at 
`in2df.drop("Label", axis=1)` with KeyError. I reproduced this with the 
generated code; `label` passes as a control. The native Python filter also 
compares names exactly.



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