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

Added parser tests #62

Merged
merged 2 commits into from
Dec 6, 2023
Merged

Added parser tests #62

merged 2 commits into from
Dec 6, 2023

Conversation

Hydrocharged
Copy link
Collaborator

@Hydrocharged Hydrocharged commented Dec 4, 2023

This PR adds a lot of parser tests (all validated against Postgres 15), in addition to fixing a ton of issues with the synopses. Never again will I rely on the Postgres documentation being correct, in some ways it's even worse than MySQL's documentation. They should have just posted the grammar, because it looks handwritten and it's actually wrong in a lot of places. Rant aside, there's actually a bit of non-test stuff here, but it's all to support the test generation, so this probably doesn't need more than a glance over.

Some fun statistics:

Test Percentage Number Description
Total 100% 332547 The total number of tests that were added
Unimplemented 96.86% 322092 The number of tests that do not parse at all
Parses 2.09% 6936 The number of tests that parse, but cannot be converted to a Vitess AST
Converts To AST 1.05% 3524 The number of tests that can successfully create a Vitess AST (accuracy not tested)

Copy link
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

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

A good start, no real comments

@Hydrocharged Hydrocharged merged commit 14bde38 into main Dec 6, 2023
6 checks passed
@Hydrocharged Hydrocharged deleted the daylon/command-tests branch December 6, 2023 09:47
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