This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push:
new 6bb96c842f49 [docs](3.x) Remove deprecated running_difference orphan
and redirect its URL (#4630)
6bb96c842f49 is described below
commit 6bb96c842f49004635ee25c8a6bc46bd8ad35c78
Author: Mingyu Chen (Rayner) <[email protected]>
AuthorDate: Fri Nov 13 08:04:45 2026 +0800
[docs](3.x) Remove deprecated running_difference orphan and redirect its
URL (#4630)
The deprecated `running_difference` documentation survives only as an
unlisted Chinese 3.x page with undefined input and order-dependent
output. Remove that active orphan and redirect its published URL to the
existing Chinese 3.x LAG reference recommended by the retired page.
Dev, 4.x, and English have no matching page. The 2.1 and older source
snapshots remain unchanged because those versions are archived. A
targeted search found no active inbound content/sidebar links to update.
Validation: `git diff --check`, `node --check docusaurus.config.js`, and
evaluation of `buildRedirectIndex()` confirmed the old URL maps to an
existing LAG document. No full site build was run.
Fixes #3902
Co-authored-by: morningman <[email protected]>
---
docusaurus.config.js | 8 +
.../numeric-functions/running-difference.md | 169 ---------------------
2 files changed, 8 insertions(+), 169 deletions(-)
diff --git a/docusaurus.config.js b/docusaurus.config.js
index ee582fe161a1..78fa3629a4c3 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -162,6 +162,14 @@ function buildRedirectIndex() {
}
}
+ // The deprecated Chinese-only 3.x running_difference page was removed.
+ // Keep its published URL useful by pointing to the ordered window function
+ // recommended by the retired page.
+ add(
+ '/zh-CN/docs/3.x/sql-manual/sql-functions/window-functions/lag',
+
'/zh-CN/docs/3.x/sql-manual/sql-functions/scalar-functions/numeric-functions/running-difference',
+ );
+
// Old 4.x slugs that have no 1:1 counterpart in the new 4.x tree
// (which was reseeded from Dev). Generated by
// scripts/migrate-4.x/build-redirects.py from the diff between
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/sql-manual/sql-functions/scalar-functions/numeric-functions/running-difference.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/sql-manual/sql-functions/scalar-functions/numeric-functions/running-difference.md
deleted file mode 100644
index 4955df520010..000000000000
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/sql-manual/sql-functions/scalar-functions/numeric-functions/running-difference.md
+++ /dev/null
@@ -1,169 +0,0 @@
----
-{
- "title": "RUNNING_DIFFERENCE",
- "language": "zh-CN",
- "description": "计算数据块中连续行值的差值。该函数的结果取决于受影响的数据块和块中数据的顺序。"
-}
----
-
-## running_difference
-## 描述
-## 语法
-
-`T running_difference(T x)`
-计算数据块中连续行值的差值。该函数的结果取决于受影响的数据块和块中数据的顺序。
-
-计算 running_difference 期间使用的行顺序可能与返回给用户的行顺序不同。所以结果是不稳定的。**此函数会在后续版本中废弃**。
-推荐使用窗口函数完成预期功能。举例如下:
-```sql
--- running difference(x)
-SELECT running_difference(x) FROM t ORDER BY k;
-
--- 窗口函数
-SELECT x - lag(x, 1, 0) OVER (ORDER BY k) FROM t;
-```
-
-## 参数
-`x` - 一列数据。数据类型可以是
TINYINT,SMALLINT,INT,BIGINT,LARGEINT,FLOAT,DOUBLE,DATE,DATETIME,DECIMAL
-
-## 返回值
-第一行返回 0,随后的每一行返回与前一行的差值。
-
-## 举例
-
-```sql
-DROP TABLE IF EXISTS running_difference_test;
-
-CREATE TABLE running_difference_test (
- `id` int NOT NULL COMMENT 'id',
- `day` date COMMENT 'day',
- `time_val` datetime COMMENT 'time_val',
- `doublenum` double NULL COMMENT 'doublenum'
-)
-DUPLICATE KEY(id)
-DISTRIBUTED BY HASH(id) BUCKETS 3
-PROPERTIES (
- "replication_num" = "1"
-);
-
-INSERT into running_difference_test (id, day, time_val,doublenum) values ('1',
'2022-10-28', '2022-03-12 10:41:00', null),
- ('2','2022-10-27',
'2022-03-12 10:41:02', 2.6),
- ('3','2022-10-28',
'2022-03-12 10:41:03', 2.5),
- ('4','2022-9-29',
'2022-03-12 10:41:03', null),
- ('5','2022-10-31',
'2022-03-12 10:42:01', 3.3),
- ('6', '2022-11-08',
'2022-03-12 11:05:04', 4.7);
-
-SELECT * from running_difference_test ORDER BY id ASC;
-
-+------+------------+---------------------+-----------+
-| id | day | time_val | doublenum |
-+------+------------+---------------------+-----------+
-| 1 | 2022-10-28 | 2022-03-12 10:41:00 | NULL |
-| 2 | 2022-10-27 | 2022-03-12 10:41:02 | 2.6 |
-| 3 | 2022-10-28 | 2022-03-12 10:41:03 | 2.5 |
-| 4 | 2022-09-29 | 2022-03-12 10:41:03 | NULL |
-| 5 | 2022-10-31 | 2022-03-12 10:42:01 | 3.3 |
-| 6 | 2022-11-08 | 2022-03-12 11:05:04 | 4.7 |
-+------+------------+---------------------+-----------+
-
-SELECT
- id,
- running_difference(id) AS delta
-FROM
-(
- SELECT
- id,
- day,
- time_val,
- doublenum
- FROM running_difference_test
-)as runningDifference ORDER BY id ASC;
-
-+------+-------+
-| id | delta |
-+------+-------+
-| 1 | 0 |
-| 2 | 1 |
-| 3 | 1 |
-| 4 | 1 |
-| 5 | 1 |
-| 6 | 1 |
-+------+-------+
-
-SELECT
- day,
- running_difference(day) AS delta
-FROM
-(
- SELECT
- id,
- day,
- time_val,
- doublenum
- FROM running_difference_test
-)as runningDifference ORDER BY id ASC;
-
-+------------+-------+
-| day | delta |
-+------------+-------+
-| 2022-10-28 | 0 |
-| 2022-10-27 | -1 |
-| 2022-10-28 | 1 |
-| 2022-09-29 | -29 |
-| 2022-10-31 | 32 |
-| 2022-11-08 | 8 |
-+------------+-------+
-
-SELECT
- time_val,
- running_difference(time_val) AS delta
-FROM
-(
- SELECT
- id,
- day,
- time_val,
- doublenum
- FROM running_difference_test
-)as runningDifference ORDER BY id ASC;
-
-+---------------------+-------+
-| time_val | delta |
-+---------------------+-------+
-| 2022-03-12 10:41:00 | 0 |
-| 2022-03-12 10:41:02 | 2 |
-| 2022-03-12 10:41:03 | 1 |
-| 2022-03-12 10:41:03 | 0 |
-| 2022-03-12 10:42:01 | 58 |
-| 2022-03-12 11:05:04 | 1383 |
-+---------------------+-------+
-
-SELECT
- doublenum,
- running_difference(doublenum) AS delta
-FROM
-(
- SELECT
- id,
- day,
- time_val,
- doublenum
- FROM running_difference_test
-)as runningDifference ORDER BY id ASC;
-
-+-----------+----------------------+
-| doublenum | delta |
-+-----------+----------------------+
-| NULL | NULL |
-| 2.6 | NULL |
-| 2.5 | -0.10000000000000009 |
-| NULL | NULL |
-| 3.3 | NULL |
-| 4.7 | 1.4000000000000004 |
-+-----------+----------------------+
-
-```
-
-### keywords
-
-running_difference
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]