doc bug: EXPLODE_SPLIT example output is not sorted despite ORDER BY (version-3.x/2.1)

Open Beginner friendly
#3,889 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
90/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
sql
Domain
documentation

Research direction

Open table-functions/explode-split.md for the version-3.x and version-2.1 documentation and inspect the EXPLODE_SPLIT example output alongside its ORDER BY query. Update the displayed rows for k1 = 5 to 1, 2, 3, then verify that the example output matches the documented query and the current engine behavior.

Written by the indexing model from the issue text.

Description

On the EXPLODE_SPLIT page (table-functions/explode-split.md, version-3.x and version-2.1), one example shows an output that contradicts its own ORDER BY:

select k1, e1 from example1 lateral view explode_split(k2, ,) tmp1 as e1 where k1 = 5 order by k1, e1;
+------+------+
| k1   | e1   |
+------+------+
|    5 | 2    |
|    5 | 3    |
|    5 | 1    |
+------+------+

k2 for k1 = 5 is 1,2,3, so explode_split yields 1, 2, 3. With ORDER BY k1, e1 the rows must come back sorted by e1 — i.e. 1, 2, 3 — which is exactly what the current engine returns (3.1.4 and 2.1.11). The documented order 2, 3, 1 is not sorted and cannot be produced by the shown query.

Suggested fix — update the expected output to the sorted order:

|    5 | 1    |
|    5 | 2    |
|    5 | 3    |

Filing separately from the missing example1 setup for this page (handled in a Line-B setup PR); all other examples on the page reproduce correctly.

Dominant language
MDX
Stars
134
Forks
466
Avg merge
1d 12h
Merged PRs (30d)
60

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/doris-website

All issues in apache/doris-website

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.