Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Aggregate function AVG() ERROR #1125

Closed
2 of 3 tasks
davidshiz opened this issue Dec 14, 2022 · 1 comment
Closed
2 of 3 tasks

bug: Aggregate function AVG() ERROR #1125

davidshiz opened this issue Dec 14, 2022 · 1 comment
Assignees
Labels
A-bug Something isn't working B-storage data type, data storage, insert,update,delete, transactions

Comments

@davidshiz
Copy link
Collaborator

davidshiz commented Dec 14, 2022

Have you read the Contributing Guidelines on issues?

Please confirm if bug report does NOT exists already ?

  • I confirm there is no existing issue for this

Describe the problem

mysql> select avg(u_bigcustKey) from test;
+--------------------+
| avg(u_bigcustKey)  |
+--------------------+
| 4073709000004.6665 |
+--------------------+
1 row in set (0.00 sec)

Expected behavior

mysql> select avg(u_bigcustKey) from test;
+--------------------+
| avg(u_bigcustKey)  |
+--------------------+
| 4073709000004.6667 |
+--------------------+
1 row in set (0.00 sec)

How To Reproduce

create table test(u_bigcustkey BIGINT);
insert into test values(4073709000001),(4073709000004),(4073709000009);
select avg(u_bigcustKey) from test;

Environment

root@ub01:/stonedb57/install# /stonedb57/install/bin/mysqld --version
/stonedb57/install/bin/mysqld  Ver 5.7.36-StoneDB for Linux on x86_64 (build-)
build information as follow:
        Repository address: https://github.com/stoneatom/stonedb.git:stonedb-5.7-dev
        Branch name: stonedb-5.7-dev
        Last commit ID: e395f89e1
        Last commit time: Date:   Tue Dec 6 01:04:24 2022 +0800
        Build time: Date: Tue Dec  6 16:03:58 CST 2022
root@ub01:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"

Are you interested in submitting a PR to solve the problem?

  • Yes, I will!
@davidshiz davidshiz added the A-bug Something isn't working label Dec 14, 2022
@wisehead wisehead added this to the stonedb_5.7_v1.0.3 milestone Jan 6, 2023
@wisehead wisehead added the B-storage data type, data storage, insert,update,delete, transactions label Jan 9, 2023
@hustjieke
Copy link
Collaborator

This will be fixed in #1226

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-bug Something isn't working B-storage data type, data storage, insert,update,delete, transactions
Projects
None yet
Development

No branches or pull requests

3 participants