Skip to content

set operations inconsistently formatted #3

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);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions