carloea2 commented on code in PR #5912:
URL: https://github.com/apache/texera/pull/5912#discussion_r3701577738
##########
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/udf/python/PythonUDFOpDescV2.scala:
##########
@@ -91,6 +107,13 @@ class PythonUDFOpDescV2 extends LogicalOp {
)
var outputColumns: List[Attribute] = List()
+ @JsonProperty
+ @JsonSchemaTitle("Parameters")
+ @JsonPropertyDescription(
+ "Parameters inferred from active self.UiParameter(...) calls in the Python
script"
+ )
+ var uiParameters: List[UiUDFParameter] = List()
Review Comment:
Empty typed values now fail; descriptors share one trait.
##########
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/udf/python/PythonUDFOpDescV2.scala:
##########
@@ -130,7 +153,7 @@ class PythonUDFOpDescV2 extends LogicalOp {
workflowId,
executionId,
operatorIdentifier,
- OpExecWithCode(code, "python")
+ OpExecWithCode(PythonUdfUiParameterInjector.inject(code,
uiParameters), "python")
Review Comment:
Added wiring tests per descriptor and computed injection once.
##########
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/udf/python/PythonUDFOpDescV2.scala:
##########
@@ -36,6 +36,22 @@ class PythonUDFOpDescV2 extends LogicalOp {
required = true,
defaultValue =
"# Choose from the following templates:\n" +
+ "# \n" +
+ "# UiParameter notes:\n" +
Review Comment:
Templates are concise; complete guidance and properties are documented.
--
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]