cloud-fan commented on code in PR #51281:
URL: https://github.com/apache/spark/pull/51281#discussion_r2167991695


##########
docs/sql-ref-syntax-ddl-create-sql-function.md:
##########
@@ -0,0 +1,305 @@
+---
+layout: global
+title: CREATE FUNCTION (SQL)
+displayTitle: CREATE FUNCTION (SQL)
+license: |
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+ 
+     http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+---
+
+### Description
+The `CREATE FUNCTION` statement creates a SQL function that can be used in SQL 
statements. The function can be temporary or permanent, and can return either a 
scalar value or a table result. The function body can be defined either a SQL 
expression or a query.
+
+When `TEMPORARY` is specified, the function is only available for the current 
session. Otherwise, it is persisted in the catalog and available across 
sessions. The `OR REPLACE` option allows updating an existing function 
definition, while `IF NOT EXISTS` prevents errors when creating a function that 
already exists.
+
+The function parameters must be specified with their data types. The return 
type can be either a scalar data type or a table with an optional schema 
definition. 

Review Comment:
   oh, the return table schema definition is optional?



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

Reply via email to