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

Date arrays and server-side binding #188

Closed
ewjoachim opened this issue May 5, 2023 · 2 comments · Fixed by #189
Closed

Date arrays and server-side binding #188

ewjoachim opened this issue May 5, 2023 · 2 comments · Fixed by #189
Labels
bug Something isn't working

Comments

@ewjoachim
Copy link
Contributor

ewjoachim commented May 5, 2023

Describe the bug

Same as #159 but with arrays of dates.

Steps to reproduce

import datetime
client.query('SELECT {l:Array(Date)}', parameters={"l": [datetime.date.today()]}).result_rows
DatabaseError: :HTTPDriver for https://rw.chcl5l17008fjmn0m8s9.at.double.cloud:8443/ returned response code 400)
 Code: 27. DB::ParsingException: Cannot parse input: expected '\'' before: '2023-05-05]'. (CANNOT_PARSE_INPUT_ASSERTION_FAILED) (version 22.8.17.17 (official build))

Expected behaviour

returns

[([datetime.date(2023, 5, 5)],)]

Code example

import clickhouse_connect
client = clickhouse_connect.get_client(
    dsn=connection_string
)
client.query('SELECT {l:Array(Date)}', parameters={"l": [datetime.date.today()]}).result_rows

clickhouse-connect and/or ClickHouse server logs

Configuration

Environment

  • clickhouse-connect version: 0.5.23
  • Python version: 3.7
  • Operating system: Ubuntu

ClickHouse server

  • ClickHouse Server version:22.8.15.23
@ewjoachim ewjoachim added the bug Something isn't working label May 5, 2023
@genzgd genzgd linked a pull request May 10, 2023 that will close this issue
2 tasks
@genzgd
Copy link
Collaborator

genzgd commented May 11, 2023

Thanks for the detailed report! This should be fixed in 0.5.24

@ewjoachim
Copy link
Contributor Author

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants