Skip to content

set operations inconsistently formatted #3

@mfulton26

Description

@mfulton26

Describe the bug

dprint-plugin-sql version: 0.3.5

UNION and INTERSECT get wrapped to new lines while EXCEPT does not.

Input Code

SELECT unnest(new_tags) UNION  SELECT unnest(previous_tags);
SELECT unnest(new_tags) INTERSECT  SELECT unnest(previous_tags);
SELECT unnest(new_tags) EXCEPT  SELECT unnest(previous_tags);

Expected Output

SELECT
  unnest(new_tags)
UNION
SELECT
  unnest(previous_tags);

SELECT
  unnest(new_tags)
INTERSECT
SELECT
  unnest(previous_tags);

SELECT
  unnest(new_tags)
EXCEPT
SELECT
  unnest(previous_tags);

Actual Output

SELECT
  unnest(new_tags)
UNION
SELECT
  unnest(previous_tags);

SELECT
  unnest(new_tags)
INTERSECT
SELECT
  unnest(previous_tags);

SELECT
  unnest(new_tags) EXCEPT
SELECT
  unnest(previous_tags);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions