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

GROUPING SETS syntax incorrect? #2048

Open
deklanw opened this issue Apr 2, 2019 · 1 comment
Open

GROUPING SETS syntax incorrect? #2048

deklanw opened this issue Apr 2, 2019 · 1 comment

Comments

@deklanw
Copy link

deklanw commented Apr 2, 2019

I first noticed this problem when trying to make CVs with GROUPING SETS according to the syntax I saw in the Postgres docs, https://www.postgresql.org/docs/current/queries-table-expressions.html like:

GROUP BY a, CUBE (b, c), GROUPING SETS ((d), (e))

Following along, I put parentheses around the groupings, as above. I got this error with all my queries involving GROUPING SETS:

ERROR: column "_0" has pseudo-type record

Looking at the PipelineDB tests:
https://github.com/pipelinedb/pipelinedb/blob/526a6f4c9a1cc4a054d4efb53cf5c92180979303/src/test/regress/sql/cont_grouping_sets.sql

GROUP BY GROUPING SETS (x), (x, y), (x, y, z), (x, z);

It looks like the outer parentheses are being omitted here. I inserted data into my CV and it definitely isn't working as expected. I'm guessing these are being parsed as records as in https://www.postgresql.org/docs/current/rowtypes.html ?

@huimingxie
Copy link

how can fix this bug?

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

2 participants