You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/05/26 06:37:53 UTC

[GitHub] [incubator-doris] englefly opened a new issue, #9789: [Bug] variance calculate error

englefly opened a new issue, #9789:
URL: https://github.com/apache/incubator-doris/issues/9789

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Version
   
   Dev-1.0.1
   
   ### What's Wrong?
   
   for column A =[34, 78, 23]
   select variance(A) 
   Expect is: 564.666666667
   But real is: 564.666666788
   
   
   
   ### What You Expected?
   
   for column A =[34, 78, 23]
   select variance(A) 
   Expect is: 564.666666667
   But real is: 564.666666788
   
   ### How to Reproduce?
   
   _No response_
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] 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-unsubscribe@doris.apache.org.apache.org

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


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


[GitHub] [incubator-doris] BiteTheDDDDt commented on issue #9789: [Bug] variance calculate error

Posted by GitBox <gi...@apache.org>.
BiteTheDDDDt commented on issue #9789:
URL: https://github.com/apache/incubator-doris/issues/9789#issuecomment-1138267117

   ```sql
   MySQL [test]> set enable_vectorized_engine=false;
   Query OK, 0 rows affected (0.001 sec)
   
   MySQL [test]>  select variance(cast(k1 as decimal)) from test_var;
   +--------------------------------------+
   | variance(CAST(`k1` AS DECIMAL(9,0))) |
   +--------------------------------------+
   |                        564.666666667 |
   +--------------------------------------+
   1 row in set (0.017 sec)
   
   MySQL [test]> set enable_vectorized_engine=true;
   Query OK, 0 rows affected (0.001 sec)
   
   MySQL [test]>  select variance(cast(k1 as decimal)) from test_var;
   +--------------------------------------+
   | variance(CAST(`k1` AS DECIMAL(9,0))) |
   +--------------------------------------+
   |                        564.666666667 |
   +--------------------------------------+
   1 row in set (0.018 sec)
   ```
   How can I reproduce the results in the description?


-- 
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-unsubscribe@doris.apache.org

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


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