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

trying to remove identical rows per group #4137

Open
2 tasks done
colemanbroad opened this issue Jan 25, 2024 · 2 comments
Open
2 tasks done

trying to remove identical rows per group #4137

colemanbroad opened this issue Jan 25, 2024 · 2 comments
Labels
bug Invalid compiler output or panic

Comments

@colemanbroad
Copy link

What happened?

A compiler bug was encountered. Please copy/paste the PRQL query into a new report at:
https://github.com/PRQL/prql/issues/new?template=bug_report.yaml

PRQL input

from df = [
{a=1,b=3},
{a=9,b=4},
{a=1,b=3},
{a=2,b=3},
]
group a (
  group df.* (
    take 1
  )
)

SQL output

WITH table_0 AS (
  SELECT
    1 AS a,
    3 AS b
  UNION
  ALL
  SELECT
    9 AS a,
    4 AS b
  UNION
  ALL
  SELECT
    1 AS a,
    3 AS b
  UNION
  ALL
  SELECT
    2 AS a,
    3 AS b
),
table_1 AS (
  SELECT
    a,
    b,
    ROW_NUMBER() OVER (PARTITION BY a) AS _expr_0
  FROM
    table_0
)
SELECT
  a,
  b
FROM
  table_1
WHERE
  _expr_0 <= 1

-- Generated by PRQL compiler version:0.11.1 (https://prql-lang.org)

Expected SQL output

No response

MVCE confirmation

  • Minimal example
  • New issue

Anything else?

No response

@colemanbroad colemanbroad added the bug Invalid compiler output or panic label Jan 25, 2024
@max-sixty
Copy link
Member

(quick message to say thanks for the issue @colemanbroad — the nested grouping still needs some work)

@colemanbroad
Copy link
Author

Thanks for your work! I absolutely love this language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Invalid compiler output or panic
Projects
None yet
Development

No branches or pull requests

2 participants