Skip to content

[FORMATTING] Formatter Adds Unwanted Space Before Dash and Number in Project Names (e.g., project -12345) #791

Open
@motherway

Description

@motherway

Screenshot 2024-10-22 at 9 20 17 AM

Whenever a project name contains a dash followed by a number then it is being interpreted as a minus number value and being separated when formatted. This is troublesome for us as a lot of our project names contain this format and the formatter is breaking our queries as a result.

We can't always rely on escaping the project name as these queries are written by end users in the browser.

Input data

-- BigQuery
select * from project-12345.table.column

Expected Output

select
  *
from
  project-12345.table.column

Actual Output

select 
  *
from
  project -12345.table.column

Usage

  • What SQL language(s) does this apply to?
    BigQuery
  • Which SQL Formatter version are you using?
    15.4.5

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions