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]: PERCENTILE_DISC function does not work #3024

Open
1 task done
schuartzrussi opened this issue Oct 16, 2024 · 0 comments
Open
1 task done

[Bug]: PERCENTILE_DISC function does not work #3024

schuartzrussi opened this issue Oct 16, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@schuartzrussi
Copy link

What happened?

I am encountering an issue when using the PERCENTILE_DISC function in Babelfish. The following query works correctly in SQL Server:

SELECT PERCENTILE_DISC(0.50) WITHIN GROUP (ORDER BY s.Value) OVER (PARTITION BY s.Code)
FROM mydbschema.IssuePercentileDisc AS s

However, when I attempt to run this query in Babelfish, i receive the following error:

OVER is not supported for ordered-set aggregate percentile_disc.

Steps to Reproduce

  1. Create the table structure and insert sample data using the following script:
CREATE TABLE IssuePercentileDisc (
  Id INT PRIMARY KEY IDENTITY(1,1),
  Value DECIMAL(19, 4) NOT NULL,
  Code INT NOT NULL
);
INSERT INTO IssuePercentileDisc (Value, Code) VALUES (123.4567, 201);
INSERT INTO IssuePercentileDisc (Value, Code) VALUES (234.5678, 201);
INSERT INTO IssuePercentileDisc (Value, Code) VALUES (345.6789, 50);
INSERT INTO IssuePercentileDisc (Value, Code) VALUES (456.7890, 789);
  1. Execute the following query:
select PERCENTILE_DISC(0.50) WITHIN GROUP (ORDER BY s.Value) OVER (PARTITION BY s.Code)
from IssuePercentileDisc as s

Version

BABEL_4_X_DEV (Default)

Extension

None

Which flavor of Linux are you using when you see the bug?

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct.
@schuartzrussi schuartzrussi added the bug Something isn't working label Oct 16, 2024
@suprio-amzn suprio-amzn added enhancement New feature or request and removed bug Something isn't working labels Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants