Closed IlluvatarEru closed 3 months ago
What timezone is your ClickHouse server using? And what is your local client timezone?
I ask because you can only get to that code if there are timezones involved. I cannot reproduce the problem locally. Also there has been work in clickhouse-connect around timezones since the 0.7.0 release, so it might help if you upgrade to the latest version.
What timezone is your ClickHouse server using? And what is your local client timezone?
Getting the below from the CH cli (connecting without any tz adjustments):
SELECT
now() AS server_timestamp,
timezone() AS server_timezone
returns
2024-08-02 07:25:59 │ Europe/Berlin
and am located in BST time.
(NB: getting the same when running using the python clickhouse-connect
)
Are you running on Windows? It seems possible you're running into this bug? https://github.com/python/cpython/issues/94414#issuecomment-1478714464
Are you running on Windows? It seems possible you're running into this bug? python/cpython#94414 (comment)
Well spotted, that must be it, was trying to run those from Windows indeed, that would also explain why it does not break in production on linux. Closing the issue.
Describe the bug I am reading data from a table, specifically getting the
distinct timestamp
. The type of that column isDateTime64(6)
.I am receiving the below error:
Note that running the exact same query from the CH client directly works fine. Note: the min timestamp in that table is:
1970-01-01 01:00:00.000000
and the max timestamp:2299-12-31 23:43:20.000000
. I have found out that deleting the rows where timestamp = max_timestamp fixed the issue.To Reproduce I am really just creating a client and running the select query:
select distinct timestamp from db.table where timestamp > '2024-07-29'
Expected behavior I am expecting the query to get the timestamps without any error.
Versions
version = '0.7.0'
24.1.3.31
3.9.19