Skip to content

Fix SourceFileParser for nested statements #33

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

Closed
psteinroe opened this issue Sep 15, 2023 · 0 comments · Fixed by #35
Closed

Fix SourceFileParser for nested statements #33

psteinroe opened this issue Sep 15, 2023 · 0 comments · Fixed by #35
Assignees
Labels
bug Something isn't working

Comments

@psteinroe
Copy link
Collaborator

Right now, the SourceFileParser cuts a sql source into individual statements and comments. These are then passed into the StatementParser.

The lexer is regex-based. Right now, it mainly tries to cut at ;. This approach does not work with nested statements, especially create function statements that contain multiple statements in their parser. Unfortunately, due to upstream limitations, the regular expressions required to exclude ; that are within dollar-quoted strings do not work. We will have to find a way to cut the source into separate statements, even for a source that contain create function statements.

@psteinroe psteinroe added the bug Something isn't working label Sep 15, 2023
@psteinroe psteinroe changed the title Fix SourceFileParser Fix SourceFileParser for nested statements Sep 15, 2023
@psteinroe psteinroe self-assigned this Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant