Skip to content

Conversation

@mchades
Copy link
Contributor

@mchades mchades commented Dec 26, 2025

What changes were proposed in this pull request?

This PR implements the server-side REST API for User-Defined Functions (UDFs), including:

  • DTO classes: FunctionDTO, FunctionDefinitionDTO, FunctionParamDTO, FunctionColumnDTO, FunctionImplDTO (with JavaImplDTO, PythonImplDTO, SQLImplDTO subclasses), FunctionResourcesDTO
  • Request/Response classes: FunctionRegisterRequest, FunctionUpdateRequest, FunctionUpdatesRequest, FunctionResponse
  • REST endpoint: FunctionOperations with register, get (with optional version), update, and delete operations
  • Exception handlers: Added function-related exception handlers
  • Utility methods: Added namespace and identifier validation for functions

Why are the changes needed?

To provide server-side REST API support for managing UDFs in Gravitino.

Fix: #9529

Does this PR introduce any user-facing change?

Yes, this PR adds new REST API endpoints for UDF management:

  • POST /metalakes/{metalake}/catalogs/{catalog}/schemas/{schema}/functions - Register a function
  • GET /metalakes/{metalake}/catalogs/{catalog}/schemas/{schema}/functions/{function} - Get a function (with optional version query param)
  • PUT /metalakes/{metalake}/catalogs/{catalog}/schemas/{schema}/functions/{function} - Update a function
  • DELETE /metalakes/{metalake}/catalogs/{catalog}/schemas/{schema}/functions/{function} - Delete a function

How was this patch tested?

  • Added comprehensive unit tests for all DTO classes (TestFunctionDTO)
  • Added comprehensive unit tests for REST endpoint (TestFunctionOperations)

@mchades mchades marked this pull request as draft December 26, 2025 01:23
@mchades mchades force-pushed the pr-udf-rest branch 2 times, most recently from 006430e to bf67ede Compare December 26, 2025 13:32
This PR implements the server-side REST API for User-Defined Functions (UDFs).

Changes include:
- Add FunctionDTO and related DTO classes for function metadata
- Add FunctionRegisterRequest and FunctionUpdateRequest for API requests
- Add FunctionResponse for API responses
- Add FunctionOperations REST endpoint with register, get, update, delete operations
- Add exception handlers for function-related errors
- Add comprehensive unit tests for all new components
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.

[Subtask] Add server-side REST interface for UDFs

1 participant