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] group by error #11159

Closed
2 of 3 tasks
shutao917 opened this issue Jul 25, 2022 · 1 comment
Closed
2 of 3 tasks

[Bug] group by error #11159

shutao917 opened this issue Jul 25, 2022 · 1 comment

Comments

@shutao917
Copy link

shutao917 commented Jul 25, 2022

Search before asking

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

Version

1.1.0

What's Wrong?

SELECT servdate AS servdate, SUM(CASE WHEN servresult = 5 THEN 1 ELSE 0 END) AS farrow_num, SUM(CASE WHEN servresult = 1 THEN 1 ELSE 0 END) AS repeat_num, SUM(CASE WHEN servresult = 4 THEN 1 ELSE 0 END) AS abort_num, SUM(CASE WHEN servresult IN (2,3) THEN 1 ELSE 0 END) AS npd_num, SUM(CASE WHEN servresult = 6 THEN 1 ELSE 0 END) AS death_num, SUM(CASE WHEN servresult = 7 THEN 1 ELSE 0 END) AS remove_num FROM yz_datawarehouse_dws.x1 GROUP BY servdate

get this error:
errCode = 2, detailMessage = select list expression not produced by aggregation output (missing from GROUP BY clause?): sum(CASE WHEN servresult IN (2, 3) THEN 1 ELSE 0 END)

table schema :
CREATE TABLE x1 ( servdate DATE NULL , servresult INT NULL ) ENGINE=OLAP DUPLICATE KEY(servdate) COMMENT "OLAP" DISTRIBUTED BY HASH(servdate) BUCKETS 16 PROPERTIES ( "replication_allocation" = "tag.location.default: 3", "in_memory" = "false", "storage_format" = "V2" )

What You Expected?

wrong

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

@kpfly
Copy link

kpfly commented Jul 25, 2022

It have been fixed #11033 , The coming release version 1.1.1 will contains this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants