Skip to content

Commit 6aa2398

Browse files
authored
[doc](function) update log function doc (#2605)
## Versions - [x] dev - [x] 3.0 - [ ] 2.1 - [ ] 2.0 ## Languages - [x] Chinese - [x] English ## Docs Checklist - [ ] Checked by AI - [ ] Test Cases Built
1 parent a11c0f2 commit 6aa2398

File tree

5 files changed

+120
-10
lines changed
  • docs/sql-manual/sql-functions/scalar-functions/numeric-functions
  • i18n/zh-CN/docusaurus-plugin-content-docs
    • current/sql-manual/sql-functions/scalar-functions/numeric-functions
    • version-3.0/sql-manual/sql-functions/scalar-functions/numeric-functions
  • versioned_docs/version-3.0/sql-manual/sql-functions/scalar-functions/numeric-functions

5 files changed

+120
-10
lines changed

docs/sql-manual/sql-functions/scalar-functions/numeric-functions/log.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ Returns the logarithm of `x` based on base `b`.
1212
## Syntax
1313

1414
```sql
15-
LOG(<b>,<x>)
15+
LOG(<b>[, <x>])
1616
```
1717

1818
## Parameters
1919

2020
| Parameter | Description |
2121
|-----------|------------|
2222
| `<b>` | Base should be greater than 0 and not be exactly 1.0 |
23-
| `<x>` | Antilogarithm should be greater than 0 |
23+
| `<x>` | optional, Antilogarithm should be greater than 0, default value is e |
2424

2525
## Return value
2626

@@ -42,6 +42,18 @@ select log(5,1);
4242
+---------------+
4343
```
4444

45+
```sql
46+
select log(3),ln(3);
47+
```
48+
49+
```text
50+
+--------------------+--------------------+
51+
| log(3) | ln(3) |
52+
+--------------------+--------------------+
53+
| 1.0986122886681098 | 1.0986122886681098 |
54+
+--------------------+--------------------+
55+
```
56+
4557
```sql
4658
select log(3,20);
4759
```

i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/numeric-functions/log.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
## 语法
1313

1414
```sql
15-
LOG(<b>,<x>)
15+
LOG(<b>[, <x>])
1616
```
1717

1818
## 参数
1919

2020
| 参数 | 说明 |
2121
|-------| -- |
2222
| `<b>` | 底数 必须大于 0 且不等于 1 |
23-
| `<x>` | 真数 必须大于 0 |
23+
| `<x>` | 可选,真数必须大于 0,默认为自然数e |
2424

2525
## 返回值
2626

@@ -42,6 +42,18 @@ select log(5,1);
4242
+---------------+
4343
```
4444

45+
```sql
46+
select log(3),ln(3);
47+
```
48+
49+
```text
50+
+--------------------+--------------------+
51+
| log(3) | ln(3) |
52+
+--------------------+--------------------+
53+
| 1.0986122886681098 | 1.0986122886681098 |
54+
+--------------------+--------------------+
55+
```
56+
4557
```sql
4658
select log(3,20);
4759
```

i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/scalar-functions/numeric-functions/log.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
## 语法
1313

1414
```sql
15-
LOG(<b>,<x>)
15+
LOG(<b>[, <x>])
1616
```
1717

1818
## 参数
1919

2020
| 参数 | 说明 |
2121
|-------| -- |
2222
| `<b>` | 底数 必须大于 0 且不等于 1 |
23-
| `<x>` | 真数 必须大于 0 |
23+
| `<x>` | 可选,真数必须大于 0,默认为自然数e |
2424

2525
## 返回值
2626

@@ -42,6 +42,18 @@ select log(5,1);
4242
+---------------+
4343
```
4444

45+
```sql
46+
select log(3),ln(3);
47+
```
48+
49+
```text
50+
+--------------------+--------------------+
51+
| log(3) | ln(3) |
52+
+--------------------+--------------------+
53+
| 1.0986122886681098 | 1.0986122886681098 |
54+
+--------------------+--------------------+
55+
```
56+
4557
```sql
4658
select log(3,20);
4759
```

sidebars.json

Lines changed: 64 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1711,17 +1711,79 @@
17111711
"type": "category",
17121712
"label": "Analytic (Window) Functions",
17131713
"items": [
1714+
"sql-manual/sql-functions/window-functions/overview",
17141715
"sql-manual/sql-functions/window-functions/cume-dist",
17151716
"sql-manual/sql-functions/window-functions/dense-rank",
17161717
"sql-manual/sql-functions/window-functions/first-value",
17171718
"sql-manual/sql-functions/window-functions/lag",
17181719
"sql-manual/sql-functions/window-functions/last-value",
17191720
"sql-manual/sql-functions/window-functions/lead",
17201721
"sql-manual/sql-functions/window-functions/ntile",
1721-
"sql-manual/sql-functions/window-functions/overview",
17221722
"sql-manual/sql-functions/window-functions/percent-rank",
17231723
"sql-manual/sql-functions/window-functions/rank",
1724-
"sql-manual/sql-functions/window-functions/row-number"
1724+
"sql-manual/sql-functions/window-functions/row-number",
1725+
"sql-manual/sql-functions/window-functions/any-value",
1726+
"sql-manual/sql-functions/window-functions/approx-count-distinct",
1727+
"sql-manual/sql-functions/window-functions/approx-top-k",
1728+
"sql-manual/sql-functions/window-functions/approx-top-sum",
1729+
"sql-manual/sql-functions/window-functions/array-agg",
1730+
"sql-manual/sql-functions/window-functions/avg",
1731+
"sql-manual/sql-functions/window-functions/avg-weighted",
1732+
"sql-manual/sql-functions/window-functions/bitmap-agg",
1733+
"sql-manual/sql-functions/window-functions/bitmap-intersect",
1734+
"sql-manual/sql-functions/window-functions/bitmap-union",
1735+
"sql-manual/sql-functions/window-functions/bitmap-union-count",
1736+
"sql-manual/sql-functions/window-functions/bitmap-union-int",
1737+
"sql-manual/sql-functions/window-functions/collect-list",
1738+
"sql-manual/sql-functions/window-functions/collect-set",
1739+
"sql-manual/sql-functions/window-functions/corr",
1740+
"sql-manual/sql-functions/window-functions/count",
1741+
"sql-manual/sql-functions/window-functions/count-by-enum",
1742+
"sql-manual/sql-functions/window-functions/covar",
1743+
"sql-manual/sql-functions/window-functions/covar-samp",
1744+
"sql-manual/sql-functions/window-functions/group-array-intersect",
1745+
"sql-manual/sql-functions/window-functions/group-bit-and",
1746+
"sql-manual/sql-functions/window-functions/group-bit-or",
1747+
"sql-manual/sql-functions/window-functions/group-bit-xor",
1748+
"sql-manual/sql-functions/window-functions/group-bitmap-xor",
1749+
"sql-manual/sql-functions/window-functions/group-concat",
1750+
"sql-manual/sql-functions/window-functions/grouping",
1751+
"sql-manual/sql-functions/window-functions/grouping-id",
1752+
"sql-manual/sql-functions/window-functions/histogram",
1753+
"sql-manual/sql-functions/window-functions/hll-raw-agg",
1754+
"sql-manual/sql-functions/window-functions/hll-union-agg",
1755+
"sql-manual/sql-functions/window-functions/intersect-count",
1756+
"sql-manual/sql-functions/window-functions/kurt",
1757+
"sql-manual/sql-functions/window-functions/linear-histogram",
1758+
"sql-manual/sql-functions/window-functions/map-agg",
1759+
"sql-manual/sql-functions/window-functions/max",
1760+
"sql-manual/sql-functions/window-functions/max-by",
1761+
"sql-manual/sql-functions/window-functions/median",
1762+
"sql-manual/sql-functions/window-functions/min",
1763+
"sql-manual/sql-functions/window-functions/min-by",
1764+
"sql-manual/sql-functions/window-functions/percentile",
1765+
"sql-manual/sql-functions/window-functions/percentile-approx",
1766+
"sql-manual/sql-functions/window-functions/percentile-array",
1767+
"sql-manual/sql-functions/window-functions/percentile_approx_weighted",
1768+
"sql-manual/sql-functions/window-functions/quantile-union",
1769+
"sql-manual/sql-functions/window-functions/regr-intercept",
1770+
"sql-manual/sql-functions/window-functions/regr-slope",
1771+
"sql-manual/sql-functions/window-functions/regr_intercept",
1772+
"sql-manual/sql-functions/window-functions/regr_slope",
1773+
"sql-manual/sql-functions/window-functions/retention",
1774+
"sql-manual/sql-functions/window-functions/sequence-count",
1775+
"sql-manual/sql-functions/window-functions/sequence-match",
1776+
"sql-manual/sql-functions/window-functions/skew",
1777+
"sql-manual/sql-functions/window-functions/stddev",
1778+
"sql-manual/sql-functions/window-functions/stddev-samp",
1779+
"sql-manual/sql-functions/window-functions/sum",
1780+
"sql-manual/sql-functions/window-functions/sum0",
1781+
"sql-manual/sql-functions/window-functions/topn",
1782+
"sql-manual/sql-functions/window-functions/topn-array",
1783+
"sql-manual/sql-functions/window-functions/topn-weighted",
1784+
"sql-manual/sql-functions/window-functions/var-samp",
1785+
"sql-manual/sql-functions/window-functions/variance",
1786+
"sql-manual/sql-functions/window-functions/window-funnel"
17251787
]
17261788
},
17271789
{

versioned_docs/version-3.0/sql-manual/sql-functions/scalar-functions/numeric-functions/log.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ Returns the logarithm of `x` based on base `b`.
1212
## Syntax
1313

1414
```sql
15-
LOG(<b>,<x>)
15+
LOG(<b>[, <x>])
1616
```
1717

1818
## Parameters
1919

2020
| Parameter | Description |
2121
|-----------|------------|
2222
| `<b>` | Base should be greater than 0 and not be exactly 1.0 |
23-
| `<x>` | Antilogarithm should be greater than 0 |
23+
| `<x>` | optional, Antilogarithm should be greater than 0, default value is e |
2424

2525
## Return value
2626

@@ -42,6 +42,18 @@ select log(5,1);
4242
+---------------+
4343
```
4444

45+
```sql
46+
select log(3),ln(3);
47+
```
48+
49+
```text
50+
+--------------------+--------------------+
51+
| log(3) | ln(3) |
52+
+--------------------+--------------------+
53+
| 1.0986122886681098 | 1.0986122886681098 |
54+
+--------------------+--------------------+
55+
```
56+
4557
```sql
4658
select log(3,20);
4759
```

0 commit comments

Comments
 (0)