Skip to content

Redshift: Support APPROXIMATE PERCENTILE_DISC - #2480

Merged
iffyio merged 12 commits into
apache:mainfrom
BenSatori:approximate-percentile-disc
Sep 10, 2026
Merged

iffyio merged 12 commits into
apache:mainfrom
BenSatori:approximate-percentile-disc

Conversation

@BenSatori

Copy link
Copy Markdown
Contributor

Add Redshift support for APPROXIMATE PERCENTILE_DISC with WITHIN GROUP.

Previously, queries such as:

SELECT APPROXIMATE PERCENTILE_DISC(0.5)
WITHIN GROUP (ORDER BY totalprice)

failed to parse. Added a regression test based on the documented Redshift syntax.

@BenSatori
BenSatori force-pushed the approximate-percentile-disc branch from 68b491c to 88094e6 Compare September 3, 2026 10:49
Comment thread src/dialect/redshift.rs Outdated
Comment thread tests/sqlparser_redshift.rs Outdated
@BenSatori
BenSatori requested a review from iffyio September 7, 2026 19:13
Comment thread tests/sqlparser_redshift.rs Outdated
Comment thread src/parser/mod.rs Outdated
Comment thread src/parser/mod.rs Outdated
@BenSatori
BenSatori requested a review from iffyio September 9, 2026 18:52

@iffyio iffyio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a couple minor comments, otherwise this looks good overall

Comment thread tests/sqlparser_redshift.rs Outdated
Comment thread src/dialect/mod.rs
@BenSatori
BenSatori requested a review from iffyio September 10, 2026 10:16

@iffyio iffyio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @BenSatori!

@iffyio
iffyio added this pull request to the merge queue Sep 10, 2026
Merged via the queue into apache:main with commit 25565b2 Sep 10, 2026
10 checks passed
@BenSatori
BenSatori deleted the approximate-percentile-disc branch September 10, 2026 12:12
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.

2 participants