这是indexloc提供的服务,不要输入任何密码
Skip to content

Formatting inserts empty lines in specific case #6785

@bveldkamp

Description

@bveldkamp

Describe the bug
I have a specific case where formatting the sql in a query window inserts an empty line inside a function between function arguments. The 2nd argument is also moved too much to the right.
I have never changed any formatting preferences, those are all default

To Reproduce

  1. Paste this sql:
SELECT W.OBJECTID,
	G.SHAPE
FROM POINTS W
LEFT JOIN POLYGONS G ON ST_CONTAINS(G.SHAPE, W.SHAPE)
  1. Format the SQL (Ctrl+Shift+K)
  2. The result looks like this (scrolll to the right):
SELECT W.OBJECTID,
	G.SHAPE
FROM POINTS W
LEFT JOIN POLYGONS G ON ST_CONTAINS(G.SHAPE,

																									W.SHAPE)

Expected behavior
Code should be formatted as:

SELECT W.OBJECTID,
	G.SHAPE
FROM POINTS W
LEFT JOIN POLYGONS G ON ST_CONTAINS(G.SHAPE, W.SHAPE)

or maybe line up the arguments on separate lines:

SELECT W.OBJECTID,
	G.SHAPE
FROM POINTS W
LEFT JOIN POLYGONS G ON ST_CONTAINS(G.SHAPE, 
                                    W.SHAPE)

Desktop (please complete the following information):

  • OS: Windows 11
  • Version: 7.6
  • Mode: Desktop

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions