[ 
https://issues.apache.org/jira/browse/CALCITE-7545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18083005#comment-18083005
 ] 

Mihai Budiu commented on CALCITE-7545:
--------------------------------------

OUT and INOUT arguments sound like a really bad idea, the semantics of OUT is 
very hard to define and implement cleanly.

So far everything in SQL is purely functional, but having OUT and INOUT can 
completely mess up the model; you have to worry about aliasing and side-effect 
order.

> Support SQL User-Defined Functions (SQL UDF) with CREATE FUNCTION Syntax
> ------------------------------------------------------------------------
>
>                 Key: CALCITE-7545
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7545
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.41.0
>            Reporter: Yu Xu
>            Assignee: Yu Xu
>            Priority: Major
>
>   Currently, Calcite only supports Java UDFs which require:
>   - Writing and compiling Java code
>   - Packaging JAR files
>   - Using CREATE FUNCTION ... AS 'className' syntax
>  
>   This adds significant friction for simple functions. SQL UDFs address this 
> by allowing:
>   - Immediate function definition in SQL
>   - No Java coding required
>   - Parameter modes (IN/OUT/INOUT) support
>   - Default parameter values
>   - Full semantic validation
>  
> This aligns Calcite with industry-standard databases like PostgreSQL/Spark... 
> that support SQL UDFs natively.
> `CREATE FUNCTION` is also part of standard SQL; you can refer to the 
> PostgreSQL documentation: 
> https://www.postgresql.org/docs/current/sql-createfunction.html



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to