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: explain ast does not handle parentheses correctly #16777

Open
1 of 2 tasks
forsaken628 opened this issue Nov 6, 2024 · 0 comments
Open
1 of 2 tasks

bug: explain ast does not handle parentheses correctly #16777

forsaken628 opened this issue Nov 6, 2024 · 0 comments
Labels
C-bug Category: something isn't working

Comments

@forsaken628
Copy link
Collaborator

Search before asking

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

Version

9c2c3dd

What's Wrong?

explain ast
  SELECT number, rank() OVER ( PARTITION BY number % 3 ORDER BY number )
  FROM numbers(1000000) where number > 10 and number > 9 and number > 8;

Extra parentheses in sql format

-[ EXPLAIN ]-----------------------------------
SELECT
    number,
    rank() OVER (( PARTITION BY number % 3 ORDER BY number ))
FROM
    numbers(1000000)
WHERE
    (
        (
            (number > 10)
            AND (number > 9)
        )
        AND (number > 8)
    )

How to Reproduce?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@forsaken628 forsaken628 added the C-bug Category: something isn't working label Nov 6, 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