Skip to content

Sorting disappears with empty group #5100

@syko

Description

@syko

What happened?

It seems grouping by nothing is otherwise a valid thing to do, except it makes an inner sort do nothing.

PRQL input

from foo
group {} (
  sort a
  take 1
)

SQL output

SELECT
  *
FROM
  foo
LIMIT
  1

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

Expected SQL output

SELECT
  *
FROM
  foo
ORDER BY
  a
LIMIT
  1

MVCE confirmation

  • Minimal example
  • New issue

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugInvalid compiler output or panic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions