tconbeer/sqlfmt

Case-sentitive identifiers within object navigation expressions are lowercased

Closed this issue · 2 comments

Describe the bug
sqlfmt changes case of identifiers within object navigation expressions (syntactic sugar for snowflake's get_path)

To Reproduce

select {'key':2, 'Key':3}:Key

Expected behavior
SQL remains unchanged. Lowercasing :Key will cause the query to return 2 instead of 3

Actual behavior

select {'key':2, 'Key':3}:key

Additional context
Reproducible from https://sqlfmt.com/

Syntax: Snowflake

There is a workaround, wrapping the identifier within quotes:

select {'key':2, 'Key':3}:"Key"

duplicates #269