Skip to content

Conversation

@plchy2
Copy link

@plchy2 plchy2 commented Dec 17, 2025

This PR fixes the inconsistency between the description and example
for ARRAY_SIZE(NULL) reported in #3073.

I did not receive a response on the issue, so I aligned the description
with the example behavior. Please let me know if a different wording
is preferred.

@plchy2 plchy2 requested a review from zclllyybb as a code owner December 17, 2025 07:24
## 返回值

返回数组中元素数量,如果输入数组为 NULL,则返回 NULL
返回数组中元素数量,如果输入数组为 NULL,则返回数组的大小,当前示例中返回 1
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. please change the example to correct result
  2. need check other documents(eng. and other versions) for the same error

Copy link
Author

Choose a reason for hiding this comment

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

Thank you for the review.

I will update the example to reflect the correct result.
I will also check the English documentation and other versions for the same inconsistency and update them accordingly.

Copy link
Author

Choose a reason for hiding this comment

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

Just to confirm before updating the examples across languages:
should ARRAY_SIZE(NULL) return NULL or 1 in Doris?
I will align all docs accordingly.

Copy link
Contributor

Choose a reason for hiding this comment

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

should return null.

Copy link
Author

Choose a reason for hiding this comment

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

I’ve updated the examples across Chinese, English, and versioned docs to clearly distinguish:

ARRAY_SIZE(NULL) → NULL

arrays containing NULL → element count

Please let me know if any further changes are needed.

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.

3 participants