Skip to content

Commit 7d36059

Browse files
authored
Remove redundant aggregate/window/scalar function documentation (#12745)
* remove redundant aggregate documentation * remove redundant window documentation * remove rudundant scalar functions
1 parent 478c6be commit 7d36059

File tree

3 files changed

+0
-229
lines changed

3 files changed

+0
-229
lines changed

docs/source/user-guide/sql/aggregate_functions.md

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ Aggregate functions operate on a set of values to compute a single result.
2424
## General
2525

2626
- [avg](#avg)
27-
- [bit_and](#bit_and)
28-
- [bit_or](#bit_or)
29-
- [bit_xor](#bit_xor)
3027
- [bool_and](#bool_and)
3128
- [bool_or](#bool_or)
3229
- [count](#count)
@@ -56,45 +53,6 @@ avg(expression)
5653

5754
- `mean`
5855

59-
### `bit_and`
60-
61-
Computes the bitwise AND of all non-null input values.
62-
63-
```
64-
bit_and(expression)
65-
```
66-
67-
#### Arguments
68-
69-
- **expression**: Expression to operate on.
70-
Can be a constant, column, or function, and any combination of arithmetic operators.
71-
72-
### `bit_or`
73-
74-
Computes the bitwise OR of all non-null input values.
75-
76-
```
77-
bit_or(expression)
78-
```
79-
80-
#### Arguments
81-
82-
- **expression**: Expression to operate on.
83-
Can be a constant, column, or function, and any combination of arithmetic operators.
84-
85-
### `bit_xor`
86-
87-
Computes the bitwise exclusive OR of all non-null input values.
88-
89-
```
90-
bit_xor(expression)
91-
```
92-
93-
#### Arguments
94-
95-
- **expression**: Expression to operate on.
96-
Can be a constant, column, or function, and any combination of arithmetic operators.
97-
9856
### `bool_and`
9957

10058
Returns true if all non-null input values are true, otherwise false.

docs/source/user-guide/sql/scalar_functions.md

Lines changed: 0 additions & 178 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
- [iszero](#iszero)
4343
- [lcm](#lcm)
4444
- [ln](#ln)
45-
- [log](#log)
4645
- [log10](#log10)
4746
- [log2](#log2)
4847
- [nanvl](#nanvl)
@@ -339,23 +338,6 @@ ln(numeric_expression)
339338
- **numeric_expression**: Numeric expression to operate on.
340339
Can be a constant, column, or function, and any combination of arithmetic operators.
341340

342-
### `log`
343-
344-
Returns the base-x logarithm of a number.
345-
Can either provide a specified base, or if omitted then takes the base-10 of a number.
346-
347-
```
348-
log(base, numeric_expression)
349-
log(numeric_expression)
350-
```
351-
352-
#### Arguments
353-
354-
- **base**: Base numeric expression to operate on.
355-
Can be a constant, column, or function, and any combination of arithmetic operators.
356-
- **numeric_expression**: Numeric expression to operate on.
357-
Can be a constant, column, or function, and any combination of arithmetic operators.
358-
359341
### `log10`
360342

361343
Returns the base-10 logarithm of a number.
@@ -567,29 +549,11 @@ trunc(numeric_expression[, decimal_places])
567549

568550
## Conditional Functions
569551

570-
- [coalesce](#coalesce)
571552
- [nullif](#nullif)
572553
- [nvl](#nvl)
573554
- [nvl2](#nvl2)
574555
- [ifnull](#ifnull)
575556

576-
### `coalesce`
577-
578-
Returns the first of its arguments that is not _null_.
579-
Returns _null_ if all arguments are _null_.
580-
This function is often used to substitute a default value for _null_ values.
581-
582-
```
583-
coalesce(expression1[, ..., expression_n])
584-
```
585-
586-
#### Arguments
587-
588-
- **expression1, expression_n**:
589-
Expression to use if previous expressions are _null_.
590-
Can be a constant, column, or function, and any combination of arithmetic operators.
591-
Pass as many expression arguments as necessary.
592-
593557
### `nullif`
594558

595559
Returns _null_ if _expression1_ equals _expression2_; otherwise it returns _expression1_.
@@ -646,102 +610,18 @@ _Alias of [nvl](#nvl)._
646610

647611
See the new documentation [`here`](https://datafusion.apache.org/user-guide/sql/scalar_functions_new.html)
648612

649-
## Binary String Functions
650-
651-
- [decode](#decode)
652-
- [encode](#encode)
653-
654-
### `encode`
655-
656-
Encode binary data into a textual representation.
657-
658-
```
659-
encode(expression, format)
660-
```
661-
662-
#### Arguments
663-
664-
- **expression**: Expression containing string or binary data
665-
666-
- **format**: Supported formats are: `base64`, `hex`
667-
668-
**Related functions**:
669-
[decode](#decode)
670-
671-
### `decode`
672-
673-
Decode binary data from textual representation in string.
674-
675-
```
676-
decode(expression, format)
677-
```
678-
679-
#### Arguments
680-
681-
- **expression**: Expression containing encoded string data
682-
683-
- **format**: Same arguments as [encode](#encode)
684-
685-
**Related functions**:
686-
[encode](#encode)
687-
688613
## Regular Expression Functions
689614

690615
Apache DataFusion uses a [PCRE-like] regular expression [syntax]
691616
(minus support for several features including look-around and backreferences).
692617
The following regular expression functions are supported:
693618

694-
- [regexp_like](#regexp_like)
695619
- [regexp_match](#regexp_match)
696620
- [regexp_replace](#regexp_replace)
697621

698622
[pcre-like]: https://en.wikibooks.org/wiki/Regular_Expressions/Perl-Compatible_Regular_Expressions
699623
[syntax]: https://docs.rs/regex/latest/regex/#syntax
700624

701-
### `regexp_like`
702-
703-
Returns true if a [regular expression] has at least one match in a string,
704-
false otherwise.
705-
706-
[regular expression]: https://docs.rs/regex/latest/regex/#syntax
707-
708-
```
709-
regexp_like(str, regexp[, flags])
710-
```
711-
712-
#### Arguments
713-
714-
- **str**: String expression to operate on.
715-
Can be a constant, column, or function, and any combination of string operators.
716-
- **regexp**: Regular expression to test against the string expression.
717-
Can be a constant, column, or function.
718-
- **flags**: Optional regular expression flags that control the behavior of the
719-
regular expression. The following flags are supported:
720-
- **i**: case-insensitive: letters match both upper and lower case
721-
- **m**: multi-line mode: ^ and $ match begin/end of line
722-
- **s**: allow . to match \n
723-
- **R**: enables CRLF mode: when multi-line mode is enabled, \r\n is used
724-
- **U**: swap the meaning of x* and x*?
725-
726-
#### Example
727-
728-
```sql
729-
select regexp_like('Köln', '[a-zA-Z]ö[a-zA-Z]{2}');
730-
+--------------------------------------------------------+
731-
| regexp_like(Utf8("Köln"),Utf8("[a-zA-Z]ö[a-zA-Z]{2}")) |
732-
+--------------------------------------------------------+
733-
| true |
734-
+--------------------------------------------------------+
735-
SELECT regexp_like('aBc', '(b|d)', 'i');
736-
+--------------------------------------------------+
737-
| regexp_like(Utf8("aBc"),Utf8("(b|d)"),Utf8("i")) |
738-
+--------------------------------------------------+
739-
| true |
740-
+--------------------------------------------------+
741-
```
742-
743-
Additional examples can be found [here](https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/regexp.rs)
744-
745625
### `regexp_match`
746626

747627
Returns a list of [regular expression](https://docs.rs/regex/latest/regex/#syntax) matches in a string.
@@ -855,7 +735,6 @@ position(substr in origstr)
855735
- [today](#today)
856736
- [make_date](#make_date)
857737
- [to_char](#to_char)
858-
- [to_date](#to_date)
859738
- [to_local_time](#to_local_time)
860739
- [to_timestamp](#to_timestamp)
861740
- [to_timestamp_millis](#to_timestamp_millis)
@@ -1103,49 +982,6 @@ Additional examples can be found [here]
1103982

1104983
- date_format
1105984

1106-
### `to_date`
1107-
1108-
Converts a value to a date (`YYYY-MM-DD`).
1109-
Supports strings, integer and double types as input.
1110-
Strings are parsed as YYYY-MM-DD (e.g. '2023-07-20') if no [Chrono format]s are provided.
1111-
Integers and doubles are interpreted as days since the unix epoch (`1970-01-01T00:00:00Z`).
1112-
Returns the corresponding date.
1113-
1114-
Note: `to_date` returns Date32, which represents its values as the number of days since unix epoch(`1970-01-01`) stored as signed 32 bit value. The largest supported date value is `9999-12-31`.
1115-
1116-
```
1117-
to_date(expression[, ..., format_n])
1118-
```
1119-
1120-
#### Arguments
1121-
1122-
- **expression**: Expression to operate on.
1123-
Can be a constant, column, or function, and any combination of arithmetic operators.
1124-
- **format_n**: Optional [Chrono format] strings to use to parse the expression. Formats will be tried in the order
1125-
they appear with the first successful one being returned. If none of the formats successfully parse the expression
1126-
an error will be returned.
1127-
1128-
[chrono format]: https://docs.rs/chrono/latest/chrono/format/strftime/index.html
1129-
1130-
#### Example
1131-
1132-
```
1133-
> select to_date('2023-01-31');
1134-
+-----------------------------+
1135-
| to_date(Utf8("2023-01-31")) |
1136-
+-----------------------------+
1137-
| 2023-01-31 |
1138-
+-----------------------------+
1139-
> select to_date('2023/01/31', '%Y-%m-%d', '%Y/%m/%d');
1140-
+---------------------------------------------------------------+
1141-
| to_date(Utf8("2023/01/31"),Utf8("%Y-%m-%d"),Utf8("%Y/%m/%d")) |
1142-
+---------------------------------------------------------------+
1143-
| 2023-01-31 |
1144-
+---------------------------------------------------------------+
1145-
```
1146-
1147-
Additional examples can be found [here](https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/to_date.rs)
1148-
1149985
### `to_local_time`
1150986

1151987
Converts a timestamp with a timezone to a timestamp without a timezone (with no offset or
@@ -3226,7 +3062,6 @@ select map_values(map([100, 5], [42,43]));
32263062

32273063
- [digest](#digest)
32283064
- [md5](#md5)
3229-
- [sha224](#sha224)
32303065
- [sha256](#sha256)
32313066
- [sha384](#sha384)
32323067
- [sha512](#sha512)
@@ -3265,19 +3100,6 @@ md5(expression)
32653100

32663101
#### Arguments
32673102

3268-
- **expression**: String expression to operate on.
3269-
Can be a constant, column, or function, and any combination of string operators.
3270-
3271-
### `sha224`
3272-
3273-
Computes the SHA-224 hash of a binary string.
3274-
3275-
```
3276-
sha224(expression)
3277-
```
3278-
3279-
#### Arguments
3280-
32813103
- **expression**: String expression to operate on.
32823104
Can be a constant, column, or function, and any combination of string operators.
32833105

docs/source/user-guide/sql/window_functions.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -140,19 +140,10 @@ All [aggregate functions](aggregate_functions.md) can be used as window function
140140

141141
## Ranking functions
142142

143-
- [row_number](#row_number)
144143
- [rank](#rank)
145144
- [dense_rank](#dense_rank)
146145
- [ntile](#ntile)
147146

148-
### `row_number`
149-
150-
Number of the current row within its partition, counting from 1.
151-
152-
```sql
153-
row_number()
154-
```
155-
156147
### `rank`
157148

158149
Rank of the current row with gaps; same as row_number of its first peer.

0 commit comments

Comments
 (0)