clickhouse_fdw icon indicating copy to clipboard operation
clickhouse_fdw copied to clipboard

Push functions down to clickhouse layer?

Open mzealey opened this issue 4 years ago • 1 comments

If I am interacting with DateTime64(x) types I typically need to either cast a date to them via toDateTime64() or cast them to a DateTime. However I cannot use the toDateTime64 or toDateTime functions in a query as postgres tries to parse them itself. Similarly with toStartOfInterval. From what I recall when trying to use clickhousedb_fdw it supported pushing at least some functions through to clickhouse (but doesn't support arrays, which is a bit of a show-stopper). Would it be possible to have some option in clickhouse_fdw to pass functions through to clickhouse?

mzealey avatar Nov 25 '20 10:11 mzealey

Only way to push down these functions is to add them in postgres side so they could pass the parser. I have added bunch of other functions, but if you need functions not from that list you will have to add them yourself, I can merge these from pull requests. You can look at #39 as an example.

ildus avatar Nov 25 '20 13:11 ildus