Skip to content

Conversation

@jagmitswami
Copy link
Contributor

@jagmitswami jagmitswami commented Oct 25, 2024

Encountered issue while handling decimal values without leading digits (for example .00457). Lexer was breaking, updated number token regex to support the similar cases and added a corresponding test case.

Sample SQL query: SELECT employee_id FROM employees WHERE salary > .456 * 1000000 AND bonus < .0000239 * salary;

An Unexpected Error Occurred
Parse error at token: 456 at line 1 column 51 Unexpected NUMBER token: {"type":"NUMBER","raw":"456","text":"456","start":50}

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@nene
Copy link
Collaborator

nene commented Oct 25, 2024

Thanks a lot!

@nene nene merged commit 472e17b into sql-formatter-org:master Oct 25, 2024
2 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.

2 participants