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

Add tests of lexer dialects (sqlparse, sqlfluff) #1313

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

avelanarius
Copy link
Member

@avelanarius avelanarius commented Feb 28, 2025

This PR adds tests of our ports of dialects from sqlparse and sqlfluff.

The test files are extracted SQL queries from the tests of sqlparse and sqlfluff. The expected outputs (tokens) are collected by running the queries through the original lexers of sqlparse and sqlfluff.

By doing this, we get a really good test coverage (>10k SQL queries, many edge case/"strange"/"tricky" SQL queries collected) and we can be almost certain that our implementation behaves identically to the original sqlparse/sqlfluff implementations.

The test files are stored in a separate repo (added to Quesma as a Git submodule), because they are large (~10MB).

This PR adds tests of our ports of dialects from sqlparse and sqlfluff.

The test files are the extracted SQL queries from the tests of sqlparse
and sqlfluff. The expected outputs (tokens) are collected by running
the queries through the original lexers of sqlparse and sqlfluff.

By doing this, we get a really good test coverage (>10k SQL queries,
many edge case/"strange"/"tricky" SQL queries collected) and we can
be almost certain that our implementation behaves identically to the
original sqlparse/sqlfluff implementations.

The test files are stored in a separate repo (added to Quesma as a Git
submodule), because they are large (~10MB).
@avelanarius
Copy link
Member Author

avelanarius commented Feb 28, 2025

The testdata repository is currently hosted at https://github.com/avelanarius/quesma-testdata-wip, but it should be moved to QuesmaOrg (before merge?)

@avelanarius avelanarius marked this pull request as ready for review February 28, 2025 08:26
@avelanarius avelanarius requested a review from a team as a code owner February 28, 2025 08:26
@mieciu
Copy link
Member

mieciu commented Mar 3, 2025

/run-integration-tests

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.

3 participants