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

Fix(bigquery): allow 2nd argument for PERCENTILE_[CONT|DISC] #1537

Merged
merged 1 commit into from
May 3, 2023

Conversation

georgesittas
Copy link
Collaborator

Fixes #1534

@tobymao made a change to _parse_lambda, can you check if it's ok? Some tests were failing but I'm not sure if there's a problem with that. For example, I removed the following test because with these changes it maps back to itself:

    def test_ignore_nulls(self):
        self.validate("SELECT COUNT(x RESPECT NULLS)", "SELECT COUNT(x)")

@tobymao
Copy link
Owner

tobymao commented May 3, 2023

the default is respect nulls, and so we should just ignore it

@georgesittas georgesittas merged commit 55dc509 into main May 3, 2023
@georgesittas georgesittas deleted the jo/percentile_fixes branch May 3, 2023 22:50
@georgesittas
Copy link
Collaborator Author

Discussed on slack

adrianisk pushed a commit to adrianisk/sqlglot that referenced this pull request Jun 21, 2023
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

Successfully merging this pull request may close these issues.

PERCENTILE_CONT and PERCENTILE_DISC expect wrong number of arguments for BigQuery dialect
2 participants