-
Notifications
You must be signed in to change notification settings - Fork 442
Closed
Labels
Description
Input data
Which SQL and options did you provide as input?
select
*
from
(
select
*
from
a
) t1_set
left join (
select
*
from
b
) t2_set on t1_set.id = t2_set.id;
Expected Output
select
*
from
(
select
*
from
a
) t1_set
left join (
select
*
from
b
) t2_set on t1_set.id = t2_set.id;Actual Output
select
*
from
(
select
*
from
a
) t1_ set
left join (
select
*
from
b
) t2_set on t1_set.id = t2_set.id;
The first table alias "t1_set" includes string "set" was departed after format
If the table alias uses "t1set" will also be depart
Usage
- How are you calling / using the library?
import { format as sqlFormatter } from 'sql-formatter';
let formatValue = sqlFormatter(value, {
language: SQL_MAP[this.type] || this.type,
tabWidth: 4, // 缩进设置为4
});- What SQL language(s) does this apply to?
spark - Which SQL Formatter version are you using?
15.3.1