Zouxxyy opened a new pull request, #8315:
URL: https://github.com/apache/paimon/pull/8315

   ### Purpose
   
   Follow-up to #8299. Aligns Paimon SQL UDF creation with Spark's 
`CreateSQLFunctionCommand`:
   
   - **Body analysis**: move analyze/validate/derive from parser rule to 
`CreatePaimonSQLFunctionCommand.run()` (execution stage), mirroring Spark's 
approach
   - **Validation**: reject aggregate/window/generator in scalar function body, 
duplicate parameter names, non-trailing defaults, NOT NULL parameters, temp 
object references, invalid default expressions
   - **Derivation**: infer deterministic and containsSQL from the analyzed plan
   - **Return type inference**: support omitting `RETURNS` clause (Spark 4.1+)
   - **Properties**: capture SQL configs (timezone, ANSI mode) and 
catalog/namespace at creation time, restore at query time
   - **Cleanup**: remove redundant options (INPUT_PARAM, RETURN_TYPE), unify 
DEFAULT metadata key handling in SparkTypeUtils
   
   ### Tests
   
   - SQL configs round-trip (ANSI mode preserved across sessions)
   - Non-deterministic function body (`rand()`)
   - Reject aggregate/window/generator in scalar body
   - Reject duplicate parameter names
   - Reject non-trailing defaults
   - Omitting RETURNS clause (Spark 4.1+ only)


-- 
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]

Reply via email to