From 9b3b71a39e916b284a5605ca625b0993ed3983f6 Mon Sep 17 00:00:00 2001 From: Takeshi Yamamuro Date: Mon, 13 Apr 2020 18:11:24 +0900 Subject: [PATCH] Fix --- docs/_data/menu-sql.yaml | 24 +++++-------------- docs/sql-ref-functions-builtin-aggregate.md | 22 ----------------- docs/sql-ref-functions-builtin-array.md | 22 ----------------- docs/sql-ref-functions-builtin-date-time.md | 22 ----------------- docs/sql-ref-functions-builtin-scalar.md | 22 ----------------- docs/sql-ref-functions-builtin.md | 26 --------------------- docs/sql-ref-functions-udf.md | 26 --------------------- docs/sql-ref-functions.md | 11 ++++++++- 8 files changed, 16 insertions(+), 159 deletions(-) delete mode 100644 docs/sql-ref-functions-builtin-aggregate.md delete mode 100644 docs/sql-ref-functions-builtin-array.md delete mode 100644 docs/sql-ref-functions-builtin-date-time.md delete mode 100644 docs/sql-ref-functions-builtin-scalar.md delete mode 100644 docs/sql-ref-functions-builtin.md delete mode 100644 docs/sql-ref-functions-udf.md diff --git a/docs/_data/menu-sql.yaml b/docs/_data/menu-sql.yaml index b8c6e50e53fb0..badb98d2e593b 100644 --- a/docs/_data/menu-sql.yaml +++ b/docs/_data/menu-sql.yaml @@ -242,23 +242,11 @@ - text: Functions url: sql-ref-functions.html subitems: - - text: Build-in Functions - url: sql-ref-functions-builtin.html - subitems: - - text: Build-in Aggregate Functions - url: sql-ref-functions-builtin-aggregate.html - - text: Build-in Array Functions - url: sql-ref-functions-builtin-array.html - - text: Build-in Date Time Functions - url: sql-ref-functions-builtin-date-time.html - - text: UDFs (User-Defined Functions) - url: sql-ref-functions-udf.html - subitems: - - text: Scalar UDFs (User-Defined Functions) - url: sql-ref-functions-udf-scalar.html - - text: UDAFs (User-Defined Aggregate Functions) - url: sql-ref-functions-udf-aggregate.html - - text: Integration with Hive UDFs/UDAFs/UDTFs - url: sql-ref-functions-udf-hive.html + - text: Scalar UDFs (User-Defined Functions) + url: sql-ref-functions-udf-scalar.html + - text: UDAFs (User-Defined Aggregate Functions) + url: sql-ref-functions-udf-aggregate.html + - text: Integration with Hive UDFs/UDAFs/UDTFs + url: sql-ref-functions-udf-hive.html - text: Datetime Pattern url: sql-ref-datetime-pattern.html diff --git a/docs/sql-ref-functions-builtin-aggregate.md b/docs/sql-ref-functions-builtin-aggregate.md deleted file mode 100644 index d59543647e025..0000000000000 --- a/docs/sql-ref-functions-builtin-aggregate.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -layout: global -title: Built-in Aggregate Functions -displayTitle: Built-in Aggregate Functions -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. ---- - -Aggregate functions \ No newline at end of file diff --git a/docs/sql-ref-functions-builtin-array.md b/docs/sql-ref-functions-builtin-array.md deleted file mode 100644 index 599d10c23b616..0000000000000 --- a/docs/sql-ref-functions-builtin-array.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -layout: global -title: Built-in Array Functions -displayTitle: Built-in Array Functions -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. ---- - -Array Functions diff --git a/docs/sql-ref-functions-builtin-date-time.md b/docs/sql-ref-functions-builtin-date-time.md deleted file mode 100644 index 10421324a3448..0000000000000 --- a/docs/sql-ref-functions-builtin-date-time.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -layout: global -title: Built-in Date and Time Functions -displayTitle: Built-in Date and Time Functions -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. ---- - -Date-Time Functions diff --git a/docs/sql-ref-functions-builtin-scalar.md b/docs/sql-ref-functions-builtin-scalar.md deleted file mode 100644 index 1d818a25c4ac1..0000000000000 --- a/docs/sql-ref-functions-builtin-scalar.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -layout: global -title: Builtin Scalar Functions -displayTitle: Builtin Scalar Functions -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. ---- - -**This page is under construction** diff --git a/docs/sql-ref-functions-builtin.md b/docs/sql-ref-functions-builtin.md deleted file mode 100644 index 917c081adb7a0..0000000000000 --- a/docs/sql-ref-functions-builtin.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -layout: global -title: Built-in Functions -displayTitle: Built-in Functions -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. ---- - -Spark SQL defines built-in functions to use, a complete list of which can be found [here](api/sql/). Among them, Spark SQL has several special categories of built-in functions: [Aggregate Functions](sql-ref-functions-builtin-aggregate.html) to operate on a group of rows, [Array Functions](sql-ref-functions-builtin-array.html) to operate on Array columns, and [Date and Time Functions](sql-ref-functions-builtin-date-time.html) to operate on Date and Time. - - * [Aggregate Functions](sql-ref-functions-builtin-aggregate.html) - * [Array Functions](sql-ref-functions-builtin-array.html) - * [Date and Time Functions](sql-ref-functions-builtin-date-time.html) diff --git a/docs/sql-ref-functions-udf.md b/docs/sql-ref-functions-udf.md deleted file mode 100644 index 2c5f204d25736..0000000000000 --- a/docs/sql-ref-functions-udf.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -layout: global -title: UDFs (User-Defined Functions) -displayTitle: UDFs (User-Defined Functions) -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. ---- - -User-Defined Functions (UDFs) are a feature of Spark SQL that allows users to define their own functions when the system's built-in functions are not enough to perform the desired task. To use UDFs in Spark SQL, users must first define the function, then register the function with Spark, and finally call the registered function. The User-Defined Functions can act on a single row or act on multiple rows at once. Spark SQL also supports integration of existing Hive implementations of UDFs, UDAFs and UDTFs. - - * [Scalar User-Defined Functions (UDFs)](sql-ref-functions-udf-scalar.html) - * [User-Defined Aggregate Functions (UDAFs)](sql-ref-functions-udf-aggregate.html) - * [Integration with Hive UDFs/UDAFs/UDTFs](sql-ref-functions-udf-hive.html) diff --git a/docs/sql-ref-functions.md b/docs/sql-ref-functions.md index dabf90bc52855..e8a0353579301 100644 --- a/docs/sql-ref-functions.md +++ b/docs/sql-ref-functions.md @@ -19,4 +19,13 @@ license: | limitations under the License. --- -Spark SQL defines commonly used functions as built-in functions. It also provides User-Defined Functions (UDFs) to allow users to define their own functions when the system’s built-in functions are not enough to perform the desired task. +Spark SQL provides two function features to meet a wide range of user needs: built-in functions and user-defined functions (UDFs). +Built-in functions are commonly used routines that Spark SQL predefines and a complete list of the functions can be found in the [Built-in Functions](api/sql/) API document. UDFs allow users to define their own functions when the system’s built-in functions are not enough to perform the desired task. + +### UDFs (User-Defined Functions) + +User-Defined Functions (UDFs) are a feature of Spark SQL that allows users to define their own functions when the system's built-in functions are not enough to perform the desired task. To use UDFs in Spark SQL, users must first define the function, then register the function with Spark, and finally call the registered function. The User-Defined Functions can act on a single row or act on multiple rows at once. Spark SQL also supports integration of existing Hive implementations of UDFs, UDAFs and UDTFs. + + * [Scalar User-Defined Functions (UDFs)](sql-ref-functions-udf-scalar.html) + * [User-Defined Aggregate Functions (UDAFs)](sql-ref-functions-udf-aggregate.html) + * [Integration with Hive UDFs/UDAFs/UDTFs](sql-ref-functions-udf-hive.html)