-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
driver:clickhouseIssues related to the ClickHouse driverIssues related to the ClickHouse driverquestionThe issue is a question. Please use Stack Overflow for questions.The issue is a question. Please use Stack Overflow for questions.
Description
Describe the bug
Working with Date types from ClickHouse doesn't work, and timestamptz is always enforced even though it's not supported.
To Reproduce
Create a ClickHouse table with a Date column:
CREATE TABLE series (
date Date,
);Create Cube.js model, as pasted below.
Then, query the date column, for example:
{
"dimensions": [
"series.date"
]
}You will see an error:
Query failed: Error: Unknown data type family: timestamptz. Maybe you meant: ['TIMESTAMP']:
Indeed, the generated SQL is as follow:
SELECT
timezone('UTC', "series".date :: timestamptz) "series__date"
FROM
series AS "series"
GROUP BY
1
ORDER BY
1 ASC
LIMIT
10000Expected behavior
A clear and concise description of what you expected to happen.
Minimally reproducible Cube Schema
cube("Series", {
data_source: "clickhouse",
sql: `
SELECT * FROM series
`,
dimensions: {
date: {
type: "time",
sql: "date",
},
},
});Version:
1.6.1
Metadata
Metadata
Assignees
Labels
driver:clickhouseIssues related to the ClickHouse driverIssues related to the ClickHouse driverquestionThe issue is a question. Please use Stack Overflow for questions.The issue is a question. Please use Stack Overflow for questions.