Skip to content

SQL formatter ignores whitespaces between a function name and the parenthesis following it #1503

@mojoaxel

Description

@mojoaxel

Describe the bug

The MySQL documentation states:

By default, there must be no whitespace between a function name and the parenthesis following it.

This is currently not fixed by the formatter.

To Reproduce
Steps to reproduce the behavior:

  1. Create new SQL file: SELECT CAST (date_time AS DATETIME) AS date_time FROM TABLE;
  2. Right-Click "Format Document" (using SQLTools).

Expected behavior
The formatted query should look like this:

SELECT CAST (date_time AS DATETIME) AS date_time
FROM TABLE;

It should look like this (without the whitespace):

SELECT CAST(date_time AS DATETIME) AS date_time
FROM TABLE;

Desktop (please complete the following information):

  • SQLTools Version v0.14.1
  • VS Code Version: 1.101.0
  • OS: Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions