carloea2 opened a new pull request, #5141: URL: https://github.com/apache/texera/pull/5141
### What changes were proposed in this PR? This PR adds the Scala backend foundation for Python UDF UI parameters. It introduces: | Area | Change | | --- | --- | | UI parameter model | Adds `UiUDFParameter`, containing backend-compatible `attribute` metadata and an editable `value`. | | Python UDF injector | Adds `PythonUdfUiParameterInjector`, which validates UI parameters and injects a reserved hook method into supported Python UDF classes. | | Safe string encoding | Marks `Attribute.getName()` as encodable so UI parameter names are safely rendered through the Python template builder. | | Test coverage | Adds Scala tests for hook injection, validation, unsupported types, reserved method conflicts, and unchanged behavior when no UI parameters exist. | This PR is stacked after the merged frontend foundation PR #5043. It does not yet wire the injector into operator execution; that wiring is handled by later PRs in the stack. Existing Python UDF workflow execution remains unchanged in this PR because `PythonUDFOpDescV2`, `PythonUDFSourceOpDescV2`, and `DualInputPortsPythonUDFOpDescV2` are not modified here. ### Any related issues, documentation, discussions? Part of the Python UDF UI parameter feature split from `feat/ui-parameter`. Related tracking issue / stack: #5044 Stack order: 1. Frontend UI parameter building blocks: #5043 2. Scala backend injection model: this PR 3. Python runtime support 4. End-to-end integration ### How was this PR tested? Commands run: ```bash sbt "WorkflowOperator / Test / testOnly org.apache.texera.amber.operator.udf.python.PythonUdfUiParameterInjectorSpec" sbt scalafmtAll sbt scalafmtCheckAll "scalafixAll --check" ``` Results: - `PythonUdfUiParameterInjectorSpec`: 10 tests passed. - `scalafmtAll`: no file changes. - `scalafmtCheckAll` and `scalafixAll --check`: passed. ### Was this PR authored or co-authored using generative AI tooling? No -- 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]
