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

Inconsistent behavior on insert with_column_types #386

Open
ergoithz opened this issue Jul 26, 2023 · 0 comments
Open

Inconsistent behavior on insert with_column_types #386

ergoithz opened this issue Jul 26, 2023 · 0 comments

Comments

@ergoithz
Copy link

ergoithz commented Jul 26, 2023

Passing both params and with_column_types to Client.execute('INSERT INTO ...', params=[...], with_column_types=True) will violate the interface by neither returning a tuple nor raising an exception about with_column_types not being compatible.

This behavior is documented in the result section of Client.execute API documentation, could be maybe improved to avoid confusion.

One would expect one of these outcomes:

  • A tuple with (result, None) (None meaning no column definitions).
  • An exception stating with_column_types cannot be True.

This behavior should also be reflected in the documentation.

Versions up to 0.2.6

The issue is about client code interfaces, both python and clickhouse versions are irrelevant.

@ergoithz ergoithz changed the title Inconsistent behavior on execute with params and with_column_types Inconsistent behavior on insert with_column_types Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant