Open
Description
What happened?
When formatting valid Trino SQL that has an ascii arrow "->", the formatter will insert a space, making the SQL invalid.
Source:
SELECT array_sort(ARRAY[3, 2, 5, 1, 2], (x, y) -> IF(x < y, 1, IF(x = y, 0, -1)));
Formatted with Trino dialect:
SELECT
array_sort(ARRAY[3, 2, 5, 1, 2], (X, Y) - > IF (x < y, 1, IF (x = y, 0, - 1)));
Notice that the arrow now has a space between the '-' and '>' characters.
Arrows in Trino SQL should not be modified.
Version
No response
Checked in Playground
- I have checked this bug in the playground.