Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling input_format_with_names_use_header discards all the input #22406

Closed
depressed-pho opened this issue Mar 31, 2021 · 2 comments · Fixed by #23202
Closed

Disabling input_format_with_names_use_header discards all the input #22406

depressed-pho opened this issue Mar 31, 2021 · 2 comments · Fixed by #23202
Assignees
Labels
bug Confirmed user-visible misbehaviour in official release comp-formats Input / output formats

Comments

@depressed-pho
Copy link
Contributor

Describe the bug
When you set the setting input_format_with_names_use_header to 0, INSERT does not actually insert rows.

How to reproduce

  • Which ClickHouse server version to use: git master a21fe0b492cbc8628126a3cd493b83e82abf9978, checked out on 2021-03-31
  • Which interface to use: the native command-line client
  • Non-default settings, if any: input_format_with_names_use_header = 0
  • CREATE TABLE statements for all tables involved:
CREATE TABLE csvtest
(
    `t` String
)
ENGINE = MergeTree
ORDER BY t
  • Sample data for all these tables
    test.csv:
t
testdata1
testdata2
  • Queries to run that lead to unexpected result:
% clickhouse-client --input_format_with_names_use_header 0 --query "INSERT INTO csvtest FORMAT CSVWithNames" < test.csv

Expected behavior
Two rows ('testdata1'), ('testdata2') will be inserted to the table csvtest.

Error message and/or stacktrace
Nothing. It silently discards the input and inserts nothing to the table.

Additional context
It works as expected if you set input_format_with_names_use_header to 1.

@depressed-pho depressed-pho added the bug Confirmed user-visible misbehaviour in official release label Mar 31, 2021
@nikitamikhaylov
Copy link
Member

nikitamikhaylov commented Mar 31, 2021

What will be if you set input_format_parallel_parsing=0 ?

@depressed-pho
Copy link
Contributor Author

I got the same result If I set both input_format_parallel_parsing and input_format_with_names_use_header to 0. That is, rows were still not inserted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed user-visible misbehaviour in official release comp-formats Input / output formats
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants