Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Unwanted line break before on conversion error in subquery #266

@PhilippSalvisberg

Description

@PhilippSalvisberg

Original statement and expected result:

select *
  from (
          select to_number(
                    sys_context('userenv', 'current_schemaid') default null on conversion error,
                    '99999990',
                    q'[nls_numeric_characters='.,']'
                 ) as model_id
            from dual
       );

Formatter result with default settings:

select *
  from (
          select to_number(
                    sys_context('userenv', 'current_schemaid') default null
              on conversion error,
                    '99999990',
                    q'[nls_numeric_characters='.,']'
                 ) as model_id
            from dual
       );

See the line break before on conversion error and the wrong indentation. Indentation is expected to be the same as the previous and next line (if a line break would be necessary).

Formatting just the subquery like this:

select to_number(
          sys_context('userenv', 'current_schemaid') default null on conversion error,
          '99999990',
          q'[nls_numeric_characters='.,']'
       ) as model_id
  from dual;

works as expected.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions