Skip to content

[doc](agg) add doc for aggregate function entropy#3412

Open
wrlcke wants to merge 4 commits intoapache:masterfrom
wrlcke:functions/entropy
Open

[doc](agg) add doc for aggregate function entropy#3412
wrlcke wants to merge 4 commits intoapache:masterfrom
wrlcke:functions/entropy

Conversation

@wrlcke
Copy link

@wrlcke wrlcke commented Feb 25, 2026

Versions

  • dev
  • 4.x
  • 3.x
  • 2.1

Languages

  • Chinese
  • English

Docs Checklist

  • Checked by AI
  • Test Cases Built

@zclllyybb
Copy link
Contributor

/review

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary — PR #3412: Add doc for aggregate function ENTROPY

Goal & Implementation

This PR adds English and Chinese documentation for the new ENTROPY aggregate function, along with a sidebar entry in sidebars.ts. The goal is clear and the implementation largely satisfies it. The doc follows the required sections (Description, Syntax, Parameters, Return Value, Examples).


Critical Checkpoint Conclusions

1. Does the implementation satisfy the goal?
Partially. All required sections are present. However, there are two concrete bugs in the Examples section and a minor formatting issue.

2. Is the change as small, clear, and focused as possible?
Yes. Only two new doc files and one sidebar entry are added. No unrelated changes.

3. Information architecture — versioned docs, localized docs, sidebars, config

  • sidebars.ts (current/dev) is updated correctly. Alphabetical placement (after covar-samp, before group-array-intersect) is correct.
  • Only docs/ (current) and i18n/zh-CN/.../current/ are added. The PR checklist marks only dev, consistent with entropy not appearing in versioned_docs/version-4.x/ or version-3.x/. No versioned sidebar changes are needed for this scope.

4. Path / anchor / slug / navigation consistency
No renames or deletions. New paths follow the existing convention. No redirect issues.

5. Docusaurus config / React / styling
No changes to components, styling, or build scripts.

6. Validation
No test cases have been built (checkbox unchecked in PR). Example outputs should be verified against a running Doris instance.

7. Issues found

  • Bug (both files): The first query example runs SELECT entropy(v) FROM t1 but the result table header shows entropy(x). It should be entropy(v). See inline comments.
  • Bug (English file only): The last output block for SELECT entropy(NULL) FROM t1 uses a ```sql fence instead of ```text. The zh-CN file correctly uses ```text. This causes the output table to render as syntax-highlighted SQL.
  • Minor (English file): Missing space: Array, Map,Struct should be Array, Map, Struct.
  • Suggestion: The multi-expression composite-key behavior described in Parameters has no example. An entropy(col1, col2) example would help users understand this non-obvious feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants