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: some simple query statements cannot be executed with pivot #16557

Open
1 of 2 tasks
cdmikechen opened this issue Oct 1, 2024 · 0 comments
Open
1 of 2 tasks

bug: some simple query statements cannot be executed with pivot #16557

cdmikechen opened this issue Oct 1, 2024 · 0 comments
Labels
C-bug Category: something isn't working

Comments

@cdmikechen
Copy link

cdmikechen commented Oct 1, 2024

Search before asking

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

Version

v1.2.615

What's Wrong?

SQL 错误: Error executing query: SQL: SELECT *
FROM test_table
PIVOT(avg("VALUE") FOR metric_code IN ('0101')) Query failed: QueryErrors{code=1005, message=Aggregate function is required} cause: null

How to Reproduce?

drop table test_table;
CREATE TABLE test_table (
  "DATA_TIME" timestamp, 
  "METRIC_CODE" string, 
  "VALUE" decimal(16,4)
);
insert into test_table values ('2024-09-30 14:09:36.000', '0101', 3.5128);

SELECT * 
FROM test_table
PIVOT(avg("VALUE") FOR metric_code IN ('0101'));

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@cdmikechen cdmikechen added the C-bug Category: something isn't working label Oct 1, 2024
@cdmikechen cdmikechen changed the title bug: Some simple query statements cannot be executed with pivot bug: some simple query statements cannot be executed with pivot Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant