sql-formatter-org / sql-formatter

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

[FORMATTING] Issue Title Here #743

Closed Altonymous closed 4 weeks ago

Altonymous commented 6 months 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 6 months 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.