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: the column that has not been aggregated, return value is wrong #1892

Open
2 of 3 tasks
davidshiz opened this issue Jun 16, 2023 · 0 comments
Open
2 of 3 tasks

bug: the column that has not been aggregated, return value is wrong #1892

davidshiz opened this issue Jun 16, 2023 · 0 comments
Labels
A-bug Something isn't working

Comments

@davidshiz
Copy link
Collaborator

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> CREATE TABLE t1 (a CHAR(1), b INT);
Query OK, 0 rows affected (0.00 sec)

mysql> INSERT INTO t1 VALUES (NULL, NULL),('a', 12),('a', 13),('b', 14),('b', 15),('b', 16),('b', 17),('b', 18),('a', 19);
Query OK, 9 rows affected (0.00 sec)
Records: 9  Duplicates: 0  Warnings: 0

mysql> SELECT a, b, sum(b) FROM t1;
+------+------+--------+
| a    | b    | sum(b) |
+------+------+--------+
| NULL |   12 |    124 |
+------+------+--------+
1 row in set (0.00 sec)

Expected behavior

mysql> SELECT a, b, sum(b) FROM t1;
+------+------+--------+
| a    | b    | sum(b) |
+------+------+--------+
| NULL | NULL |    124 |
+------+------+--------+
1 row in set (0.00 sec)

How To Reproduce

No response

Environment

[root@stonedb-test mysql-test]# /stonedb57/install/bin/mysqld --version
/stonedb57/install/bin/mysqld  Ver 5.7.36-StoneDB-v1.0.1 for Linux on x86_64 (bu
build information as follow:
        Repository address: https://github.com/stoneatom/stonedb.git:stonedb-5.7
        Branch name: stonedb-5.7-dev
        Last commit ID: f180323
        Last commit time: Date:   Wed Jun 14 15:44:47 2023 +0800
        Build time: Date: Thu Jun 15 07:27:24 UTC 2023

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 Jun 16, 2023
@davidshiz davidshiz added this to the StoneDB_5.7_v1.0.4 milestone Jun 16, 2023
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
Projects
Status: No status
Development

No branches or pull requests

1 participant