sql-formatter-org / sql-formatter

A whitespace formatter for different query languages
https://sql-formatter-org.github.io/sql-formatter/
MIT License
2.22k stars 392 forks source link

[FORMATTING] Issue Title Here #743

Open Altonymous opened 1 month ago

Altonymous commented 1 month ago

Input data SELECT webhook_data_json.unified_receipt.latest_receipt_info[0].is_trial_period::boolean

Expected Output

SQL to be formatted.

Actual Output

Unable to format SQL: Error: Parse error: Unexpected "[0].is_tri" at line 5 column 112

Usage

nene commented 1 month ago

Thanks for reporting.

I didn't know that RedShift supports the array-access syntax. Could you point me to the relevant part of RedShift documentation that describes this?

Be aware though that I can't fix this issue in "Prettier SQL VSCode extension". See the FAQ.