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

Variant Expressions get extra space #637

Open
aersam opened this issue Oct 23, 2024 · 1 comment
Open

Variant Expressions get extra space #637

aersam opened this issue Oct 23, 2024 · 1 comment
Labels
bug Something isn't working databricks

Comments

@aersam
Copy link

aersam commented Oct 23, 2024

Describe the bug

An Databricks Variant expression such as select e.col:['attr_ID']::string as id gets an extra space: select e.col: ['attr_ID']::string as id

To Reproduce

import sqlfmt.api as sqlfmt

sql = """
        select e.col:['attr_ID']::string as id
        from expl e"""

print(sqlfmt.format_string(sql, sqlfmt.Mode()))

Expected behavior
Should not add that space :)

Actual behavior
Provide any output generated by sqlfmt here. If this is a formatting issue, include the code generated by sqlfmt.

Additional context
What is the output of sqlfmt --version?
sqlfmt, version 0.23.2

@tconbeer tconbeer added the bug Something isn't working label Oct 23, 2024
@tconbeer
Copy link
Owner

Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working databricks
Projects
None yet
Development

No branches or pull requests

2 participants