Skip to content

[SPARK-50698][SQL] Refactor CreateUserDefinedFunction command to extend from UnaryRunnableCommand - #58157

Open
zahed1994 wants to merge 8 commits into
apache:masterfrom
zahed1994:SPARK-50698-refactor-udf-command
Open

[SPARK-50698][SQL] Refactor CreateUserDefinedFunction command to extend from UnaryRunnableCommand#58157
zahed1994 wants to merge 8 commits into
apache:masterfrom
zahed1994:SPARK-50698-refactor-udf-command

Conversation

@zahed1994

Copy link
Copy Markdown

What changes were proposed in this pull request?

This PR refactors CreateUserDefinedFunctionCommand to extend from UnaryRunnableCommand, taking child: LogicalPlan.

It follows up on #49126 (SPARK-48730) by removing the duplicate CreateUserDefinedFunction Catalyst logical plan from v2Commands.scala and unifying the command structure.

Why are the changes needed?

To simplify and unify the logical command abstractions for SQL UDFs introduced in #49126.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

  • Updated unit tests in CreateSQLFunctionParserSuite.

…nd from UnaryRunnableCommand

### What changes were proposed in this pull request?
This PR refactors `CreateUserDefinedFunctionCommand` to extend from `UnaryRunnableCommand`, taking `child: LogicalPlan`.

It follows up on apache#49126 (SPARK-48730) by removing the duplicate `CreateUserDefinedFunction` Catalyst logical plan from `v2Commands.scala` and unifying the command structure.

### Why are the changes needed?
To simplify and unify the logical command abstractions for SQL UDFs introduced in apache#49126.

### Does this PR introduce any user-facing change?
No.

### How was this patch tested?
- Updated unit tests in `CreateSQLFunctionParserSuite`.
@zahed1994
zahed1994 force-pushed the SPARK-50698-refactor-udf-command branch from 06f1c12 to c52fb4d Compare August 20, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant