-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This eliminates an error we encountered with Hydrolix. ``` Q3006: Unspecified database error. clickhouse: query failed. err: code: 169, message: Key expression contains comparison between inconvertible types: DateTime64(3) and Float64 inside reqTimeSec >= 1727858503270 ``` It's possible to compare dates and floats in Clickhouse from 2022 year, but in 2021 it wasn't possible, and Hydrolix must use some earlier version, so I created a solution which works in both scenarios I move date parsing from Clickhouse to Quesma, removing usage of Clickhouse's `parseDateTimeBestEffort()`. Now we parse date ourselves, and use `toDateTime64()` to compare this date with date field (checked, it works fine also for fields of basic `DateTime` type, not `DateTime64`, even in Clickhouse 4 years ago). Elastic has like 50 different date formats available, so I doubt all of them are available in Clickhouse or other databases, so it's a move in the right direction, I guess. After: <img width="1728" alt="Screenshot 2024-10-06 at 17 15 22" src="https://github.com/user-attachments/assets/952c6a9e-2a3e-43ce-85f5-fd19c1373018"> Timestamps are fine: there's `"gte": 1727858503270` in the request, which is `Wed Oct 02 2024 08:41:43 GMT+0000`, so histogram starts fine from `8:41:30`: <img width="505" alt="Screenshot 2024-10-06 at 17 15 49" src="https://github.com/user-attachments/assets/3d9acfb9-90c6-4341-b149-48c214e3d0d2"> --------- Co-authored-by: Jacek Migdal <[email protected]>
- Loading branch information
Showing
17 changed files
with
360 additions
and
458 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.