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

Fix comment syntax in MySQL parser #460

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

nguyenalter
Copy link
Contributor

@nguyenalter nguyenalter commented Oct 13, 2023

Summary

Fix comment syntax in MySQL parser

Issue

Lasting Changes (Technical)

  • MySQL parser: Ignore case-sensitive when parsing COMMENT token
  • Add a new testcase to test lowercase SQLs

Checklist

Please check directly on the box once each of these are done

  • Documentation (if necessary)
  • Tests (integration test/unit test)
  • Integration Tests Passed
  • Code Review

Comment on lines +459 to +460
= "COMMENT"i _ ("=" _)? comment: "'" c:[^']* "'" {return c.join('')}
/ "COMMENT"i _ ("=" _)? comment: "\"" c:[^"]* "\"" {return c.join('')}
Copy link
Collaborator

@huyphung1602 huyphung1602 Oct 13, 2023

Choose a reason for hiding this comment

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

If we disregard this word's case sensitivity, are there any problems?
I'm not sure why we didn't ignore the case sensitive here earlier; I just want to learn it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no issue. We forgot to ignore the case sensitive for this token in the past 🙏

Most of the SQL keywords are case-insensitive so it's better if we can parse the keywords correctly.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Try to create another Asana task to list the remaining keywords that tie in to these same problems. It could be brought up again for future updates.

@nguyenalter nguyenalter merged commit 6a843e8 into master Oct 16, 2023
3 checks passed
@nguyenalter nguyenalter deleted the fix/mysql-importer-comment-syntax branch October 16, 2023 03:33
@nguyenalter nguyenalter added the PR: Bug Fix 🐛 A type of pull request used for changelog categories label Oct 16, 2023
@coderabbitai coderabbitai bot mentioned this pull request Apr 25, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Bug Fix 🐛 A type of pull request used for changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants