incubator-doris [Bug] variance is different with trino

yhxst69z  于 2022-04-22  发布在  Java
关注(0)|答案(3)|浏览(182)

Search before asking

  • I had searched in the issues and found no similar issues.

Version

master

What's Wrong?

variance's result is different with trino when run a trino's regression test.
doris: 9223845.040000001 1239.7633269557336
trino: 9882691.114285714286|1328.3178503097142857|

The case can be found here.
https://github.com/trinodb/trino/blob/master/testing/trino-product-tests/src/main/resources/sql-tests/testcases/aggregate/variance.sql

What You Expected?

may be a bug, and i am not sure.

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

6rvt4ljy

6rvt4ljy1#

can you provide some data to reproduce?

nhaq1z21

nhaq1z213#

First of all, in Doris and Mysql, variance alias to var_pop, but Spark and PostgreSQL and others, variance alias to var_samp.

But still the result is still a little different for var_samp and var_pop, even in Mysql and PostgreSQL.

相关问题