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

Feat(prql): Handle DESC with sort #3299

Merged
merged 4 commits into from Apr 11, 2024
Merged

Conversation

fool1280
Copy link
Contributor

No description provided.

sqlglot/dialects/prql.py Outdated Show resolved Hide resolved
sqlglot/dialects/prql.py Outdated Show resolved Hide resolved
sqlglot/dialects/prql.py Outdated Show resolved Hide resolved
tests/dialects/test_prql.py Outdated Show resolved Hide resolved
@@ -5,56 +5,56 @@ class TestPRQL(Validator):
dialect = "prql"

def test_prql(self):
self.validate_identity("FROM x", "SELECT * FROM x")
Copy link
Owner

Choose a reason for hiding this comment

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

why did you change these tests?

Copy link
Contributor Author

@fool1280 fool1280 Apr 11, 2024

Choose a reason for hiding this comment

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

Btw, it also seems that PRQL's keywords are case-sensitive. So FROM x is not valid, but from x is. You can use their playground environment to check these things:

Screenshot 2024-04-11 at 1 39 35 PM

PRQL keyword are case sensitive so I just lowercase all of them, and check whether they're valid in the playground

@georgesittas georgesittas merged commit 4790414 into tobymao:main Apr 11, 2024
5 checks passed
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.

None yet

3 participants