wzymumon opened a new issue, #18191:
URL: https://github.com/apache/doris/issues/18191

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   branch:master
   commit id:d7cb5cf3db2662d1a2e5adf52ab0b920cb4b1387
   
   ### What's Wrong?
   
   The array function `countEqual` returns an incorrect value `1`, instead of 
the actual occurrence times `3` of the given element `5` in the array.
   ```
   mysql> select countEqual([1,2,3,4,5,5,5], 5);
   +-------------------------------------------+
   | countequal(ARRAY(1, 2, 3, 4, 5, 5, 5), 5) |
   +-------------------------------------------+
   |                                         1 |
   +-------------------------------------------+
   1 row in set (0.03 sec)
   ```
   
   ### What You Expected?
   
   Returns a number of the `value` in the given array. In `[1,2,3,4,5,5,5]`, it 
should return 3.
   ```
   mysql> select countEqual([1,2,3,4,5,5,5], 5);
   +-------------------------------------------+
   | countequal(ARRAY(1, 2, 3, 4, 5, 5, 5), 5) |
   +-------------------------------------------+
   |                                         3 |
   +-------------------------------------------+
   ```
   
   ### How to Reproduce?
   
   _No response_
   
   ### Anything Else?
   
   I am working on the `array_count` function and I am willing to submit this 
PR for `countEqual`, but it may take some time.
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: commits-unsubscr...@doris.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to