-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
sql "is [not] distinct from" expressions are incorrectly split by "from" #327
Comments
Thanks for the report. Never heard of "is distinct from" before. Will be an easy add. |
@tconbeer If you're open to it, I'm happy to work on implementing this. Seems like a simple add to Rule(name="word_operator", ...) in Let me know! |
Yes, exactly! And add tests, please! |
Don't worry about updating the primer -- you probably don't need to for this change. Please just open a PR and it'll run in CI. I'll help you with primer changes if necessary |
closed by #332 |
Describe the bug
When formatting a "is [not] distinct from" SQL expression (postgreSQL snowflake), the library seems to look for the "from" part and uses it to split the expression into multiple lines, even when exists enough horizontal spaces to keep the expression untouched.
To Reproduce
Example input expression:
Expected behavior
The "is [not] distinct from" expressions should be kept in a single line:
Actual behavior
Additional context
tested with sqlfmt v0.13.0
Many, many thanks for the library!! Even in the current early stage is a really useful tool for us!
The text was updated successfully, but these errors were encountered: