You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
format_query_value ignores int and float data types. As result if query includes %(param)f or %(param)d, it crashes
Steps to reproduce
run clickhouse docker run -d -p 8123:8123 clickhouse/clickhouse-server
run Code example
Expected behaviour
Query is executed without any errors
Code example
importclickhouse_connectclient=clickhouse_connect.get_client(host="localhost")
client.query("SELECT initial_port FROM system.query_log WHERE initial_port > %(p_0)d", parameters={"p_0": 2})
clickhouse-connect and/or ClickHouse server logs
File ".../lib/python3.11/site-packages/clickhouse_connect/driver/query.py", line 360, in finalize_query
return query % {k: format_query_value(v, server_tz) for k, v in parameters.items()}
Configuration
Environment
clickhouse-connect version: 0.7.4
Python version: 3.11
Operating system: Linux
ClickHouse server
ClickHouse Server version: 24.3.1
The text was updated successfully, but these errors were encountered:
Describe the bug
format_query_value ignores int and float data types. As result if query includes
%(param)f
or%(param)d
, it crashesSteps to reproduce
docker run -d -p 8123:8123 clickhouse/clickhouse-server
Expected behaviour
Query is executed without any errors
Code example
clickhouse-connect and/or ClickHouse server logs
Configuration
Environment
ClickHouse server
The text was updated successfully, but these errors were encountered: