Some debugging revealed that a query parameter is being added to the HTTP url for the remote client if it's called after first creating a local client: https://play.clickhouse.com:443?date_time_input_format=best_effort.
This seems to come from the params of the HTTPClient itself, which are being persisted between calls to get_client.
i.e. date_time_input_format is being set by the local client and inherited by the remote client, which doesn't seem like it should be happening:
Thanks for the detailed report. I agree that such inheritance should not be happening, so I'm guessing that the original class level dictionary is being incorrectly modified.
Describe the bug
Creating a client connecting to a read-only remote host (e.g.
play.clickhouse.com
) errors if one has already created a client connecting tolocalhost
:Steps to reproduce
play.clickhouse.com
)Expected behaviour
I expect to be able to create a client for any host regardless if another client was created first.
Code example
MWE:
Reversing the order of the clients works
Some debugging revealed that a query parameter is being added to the HTTP
url
for the remote client if it's called after first creating a local client:https://play.clickhouse.com:443?date_time_input_format=best_effort
.This seems to come from the
params
of theHTTPClient
itself, which are being persisted between calls toget_client
. i.e.date_time_input_format
is being set by the local client and inherited by the remote client, which doesn't seem like it should be happening:Configuration
Environment