boluor opened a new issue, #3902:
URL: https://github.com/apache/doris-website/issues/3902
While verifying SQL-function example pages I found `running-difference` is
in an inconsistent state across versions.
**Findings**
1. **The function is deprecated** — the page itself says so
("此函数会在后续版本中废弃,推荐使用窗口函数"), and the page has been **removed entirely from `dev`
and `version-4.x`** (both EN and ZH).
2. In **version-2.1** and **version-3.x** the page survives **only in
Chinese**
(`i18n/zh-CN/.../version-{2.1,3.x}/sql-manual/sql-functions/scalar-functions/numeric-functions/running-difference.md`)
— there is no EN counterpart in those versions (only the EOL 1.2/2.0 trees
have one).
3. The description's example references an **undefined table `t`**:
```sql
SELECT running_difference(x) FROM t ORDER BY k;
SELECT x - lag(x, 1, 0) OVER (ORDER BY k) FROM t;
```
These are an illustrative function-form-vs-window-form comparison (no
output shown), so they aren't runnable as-is.
4. The worked example (`running_difference_test`, `BUCKETS 3`) is
**documented as non-deterministic** ("结果是不稳定的", the row order used during
computation may differ from the returned order), so its printed output cannot
be reliably reproduced.
**Suggestion**
Since the function is deprecated and the page is already gone from dev/4.x,
the cleanest fix is to **remove the orphaned zh-only `running-difference` page
from version-2.1 and version-3.x** to match dev/4.x, rather than retrofit a
table for a deprecated, non-deterministic example. (If keeping it is preferred,
the `FROM t` snippet should be marked illustrative and the worked example
reworked to be deterministic.)
Happy to open a PR removing the 2.1/3.x zh pages if that's the preferred
direction.
--
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]