-
-
Notifications
You must be signed in to change notification settings - Fork 214
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
ParsingException is raised when parameterized query parameter is named "limit" or "offset" #376
Comments
Got the same error. The error is not in 0.2.5. Can give you more details if needed. |
I don't know on which side the problem is.
There are two ways to solve this: automatically quote parameter on client side or on server side. I'd suggest to wait some time. May be it will be fixed on server side. Here is workaround to get 0.2.6 work without server-side parameters (client protocol downgrading): from clickhouse_driver import Client, defines
client = Client('localhost', client_revision=defines.DBMS_MIN_PROTOCOL_VERSION_WITH_QUOTA_KEY)
client.execute("SELECT * FROM system.events LIMIT %(limit)s OFFSET %(offset)s", {"limit": 20, "offset": 30}) |
Got the same issue after upgrade Your solution with I've checked clickhouse issues but found no usable information there. Currently we use ClickHouse server version |
same problem im using DBUtils |
@dshein-alt If you pin revision for a long time, which obviously not recommended, ClickHouse server will not accept connections from your code. Both client (driver) and server has revision check and may refuse connection with remote side if it's considered too old. "Too old" here mean not supported anymore. It depends on ClickHouse server accept policy. AFAIK, it's pretty flexible and many old clients are supported. You can try to connect with old |
Version 0.2.7 is released. Now you can choose between client or server side templating. |
Using
limit
and/oroffset
as a parameter name in a parameterized query raisesDB::ParsingException
.Following query:
raises an exception:
Query executes without exception when anything else is used as a parameter names.
Versions
clickhouse-driver: 0.2.6
Clickhouse server: 23.4.2.11
Python: 3.8
The text was updated successfully, but these errors were encountered: