flyrain commented on code in PR #15180:
URL: https://github.com/apache/iceberg/pull/15180#discussion_r2908702491
##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -4181,6 +4259,228 @@ components:
items:
$ref: '#/components/schemas/Namespace'
+ LoadFunctionResult:
+ description: |
+ Result returned when a function is loaded from the catalog.
+
+
+ The function metadata JSON is returned in the `metadata` field. The
location of the metadata
+ file is returned in the `metadata-location` field.
+
+
+ The `config` map returns function-specific configuration for accessing
the function's resources,
+ including any required credentials or client configuration overrides.
+ type: object
+ required:
+ - metadata-location
+ - metadata
+ properties:
+ metadata-location:
+ type: string
+ metadata:
+ $ref: '#/components/schemas/UdfMetadata'
+ config:
+ type: object
+ additionalProperties:
+ type: string
+
+ UdfMetadata:
+ description: |
+ Portable UDF metadata format.
+
+
+ Each function is represented by a self-contained metadata file. The
`format-version` field
+ identifies the UDF metadata format.
+ type: object
+ required:
+ - function-uuid
+ - format-version
+ - definitions
+ - definition-log
+ properties:
+ function-uuid:
+ type: string
+ description: A UUID that identifies this UDF, generated once at
creation.
+ format-version:
+ type: integer
+ description: UDF specification format version (must be 1).
+ enum: [1]
+ definitions:
+ type: array
+ description: List of function definition entities.
+ items:
+ $ref: '#/components/schemas/UdfDefinition'
+ definition-log:
+ type: array
+ description: History of versions within the function's definitions.
+ items:
+ $ref: '#/components/schemas/UdfDefinitionLogEntry'
+ location:
+ type: string
+ description: The function's base location; used to create metadata
file locations.
+ nullable: true
+ properties:
+ type: object
+ description: A string-to-string map of properties.
+ additionalProperties:
+ type: string
+ nullable: true
+ secure:
+ type: boolean
+ description: Whether it is a secure function.
+ default: false
+ nullable: true
+ doc:
+ type: string
+ description: Documentation string.
+ nullable: true
+
+ UdfDefinition:
+ type: object
+ required:
+ - definition-id
+ - parameters
+ - return-type
+ - versions
+ - current-version-id
+ - function-type
+ properties:
+ definition-id:
+ type: string
+ description: An identifier derived from the canonical parameter-type
tuple.
+ parameters:
+ type: array
+ description: Ordered list of function parameters. Invocation order
must match this list.
+ items:
+ $ref: '#/components/schemas/UdfParameter'
+ return-type:
+ $ref: '#/components/schemas/UdfType'
+ return-nullable:
+ type: boolean
+ description: A hint to indicate whether the return value is nullable
or not.
+ default: true
+ nullable: true
+ versions:
+ type: array
+ description: Versioned implementations of this definition.
+ items:
+ $ref: '#/components/schemas/UdfDefinitionVersion'
+ current-version-id:
+ type: integer
+ description: Identifier of the current version for this definition.
+ function-type:
+ type: string
+ description: Function type.
+ enum: ["udf", "udtf"]
+ doc:
+ type: string
+ description: Documentation string.
+ nullable: true
+
+ UdfParameter:
+ type: object
+ required:
+ - type
+ - name
+ properties:
+ type:
+ $ref: '#/components/schemas/UdfType'
+ name:
+ type: string
+ doc:
+ type: string
+ description: Parameter documentation.
+ nullable: true
+
+ UdfType:
+ description: >
+ A UDF data type, encoded either as a type string (e.g., "int",
"decimal(9,2)") or as a JSON
+ object for nested types (struct, list, map) following the Iceberg type
JSON representation.
Review Comment:
Nested type is based on the Iceberg type, but a bit different from Iceberg
type, see here, https://iceberg.apache.org/udf-spec/#types. We may clarify it a
bit.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]