-
Notifications
You must be signed in to change notification settings - Fork 442
Closed as not planned
Labels
Description
Setting an arbitrarily large expression width doesn't lead to window functions staying on a single line
Goal is similar to #168 which I believe is now "expressionWidth"
Input data
Which SQL and options did you provide as input?
-- Simplified example
SELECT
PERCENTILE_CONT(1) within GROUP (ORDER BY blocks_read) AS blocks_read_p100,
PERCENTILE_CONT(0.99) within GROUP (ORDER BY blocks_read) AS blocks_read_p99,
PERCENTILE_CONT(0.95) within GROUP (ORDER BY blocks_read) AS blocks_read_p95,
FROM
query_metricsExpected Output
SELECT
PERCENTILE_CONT(1) within GROUP (ORDER BY blocks_read) AS blocks_read_p100,
PERCENTILE_CONT(0.99) within GROUP (ORDER BY blocks_read) AS blocks_read_p99,
PERCENTILE_CONT(0.95) within GROUP (ORDER BY blocks_read) AS blocks_read_p95,
FROM
query_metricsActual Output
SELECT
PERCENTILE_CONT(1) within GROUP (
ORDER BY
blocks_read
) AS blocks_read_p100,
PERCENTILE_CONT(0.99) within GROUP (
ORDER BY
blocks_read
) AS blocks_read_p99,
PERCENTILE_CONT(0.95) within GROUP (
ORDER BY
blocks_read
) AS blocks_read_p95,
FROM
query_metricsMy settings from vscode
"SQL-Formatter-VSCode.dialect": "redshift",
"SQL-Formatter-VSCode.tabSizeOverride": 1,
"SQL-Formatter-VSCode.keywordCase": "upper",
"SQL-Formatter-VSCode.expressionWidth": 400,
"SQL-Formatter-VSCode.dataTypeCase": "upper",
"SQL-Formatter-VSCode.denseOperators": true,
"SQL-Formatter-VSCode.functionCase": "upper",
"SQL-Formatter-VSCode.paramTypes": {
}Usage
- How are you calling / using the library? Vscode
- What SQL language(s) does this apply to? Redshift/PostgreSQL
- Which SQL Formatter version are you using? 4.1.7