Skip to content

Clickhouse format outputs the settings twice when format is defined #38895

@Algunenano

Description

@Algunenano

This happens when using the CLI:

:) select * from system.one format CSV settings max_execution_time = 0.001;

SELECT *
FROM system.one
SETTINGS max_execution_time = 0.001
FORMAT CSV
SETTINGS max_execution_time = 0.001

Query id: e9fd3179-42a3-4a0e-b205-c5444765ad26

0

1 row in set. Elapsed: 0.001 sec.

And also when using clickhouse format directly:

clickhouse format <<< "select * from system.one format CSV settings max_execution_time = 0.001"

SELECT *
FROM system.one
SETTINGS max_execution_time = 0.001
FORMAT CSV
SETTINGS max_execution_time = 0.001

As far as I can see and remember this has happened since forever (just tested 20.7 which is the oldest binary I have around and it's the same) but I couldn't find any report about it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    unexpected behaviourResult is unexpected, but not entirely wrong at the same time.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions