Skip to content

feat(udf): add Scala UiParameter injection support - #2

Closed
carloea2 wants to merge 1 commit into
ui-parameter-1from
ui-parameter-2
Closed

carloea2 wants to merge 1 commit into
ui-parameter-1from
ui-parameter-2

Conversation

@carloea2

@carloea2 carloea2 commented May 3, 2026

Copy link
Copy Markdown
Owner

What changes were proposed in this PR?

This is PR 2 of the UiParameter split stack, based on PR 1.

This PR adds Scala-side infrastructure for injecting UI parameter values into Python UDF code, but does not activate it in execution yet.

It includes:

  • PythonUdfUiParameterInjector.
  • Validation for missing attributes, conflicting duplicate names, reserved hook collisions, and unsupported binary parameter types.
  • Scala tests for injection behavior.
  • String encoding support for parameter attribute names.

Execution remains unchanged in this PR: Python UDF descriptors still call OpExecWithCode(code, "python").

sequenceDiagram
    autonumber

    participant Desc as Scala UDF Descriptor
    participant Params as uiParameters Metadata
    participant Injector as PythonUdfUiParameterInjector
    participant Tests as Injector Specs
    participant Exec as Existing Execution Path

    Desc->>Params: Holds inert uiParameters
    Tests->>Injector: Validate injection behavior
    Injector->>Injector: Validate names, types, reserved hook
    Injector->>Injector: Generate hook code when called
    Desc->>Exec: Still executes original code
    Note over Desc,Exec: Injector exists but is not wired into runtime yet
Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant