HappenLee opened a new issue #5171:
URL: https://github.com/apache/incubator-doris/issues/5171


   **Describe the bug**
   Column Data A: (65536, null, null,null)
   Call function `percentile_approx(`A`, 0.5)` should return `65536`, but 
result is `nan`
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. create table
   ```
   CREATE TABLE `per` (
     `A` bigint(20) NULL COMMENT ""
   ) ENGINE=OLAP
   DUPLICATE KEY(`A`)
   COMMENT "OLAP"
   DISTRIBUTED BY HASH(`A`) BUCKETS 5
   PROPERTIES (
   "replication_num" = "1",
   "in_memory" = "false",
   "storage_format" = "V2"
   );
   ```
   
   2. Insert data into the table
   ```
   insert into per values(65536)
   ```
   
   3. set parallel_fragment_exec_instance_num
   ```
   set parallel_fragment_exec_instance_num = 15;
   ```
   
   4. Do query
   ```
   SELECT PERCENTILE_APPROX(A, 0.5) from per;
   +-----------------------------+
   | percentile_approx(`A`, 0.5) |
   +-----------------------------+
   |                   65536                |
   +-----------------------------+
   ```
   
   There is a certain probability
   
   result is
   
   ```
   SELECT PERCENTILE_APPROX(A, 0.5) from per;
   +-----------------------------+
   | percentile_approx(`A`, 0.5) |
   +-----------------------------+
   |                   nan              |
   +-----------------------------+
   ```
   
   
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to