You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A simple query SELECT "InsertionDate" from "AdvertisingCab" order by extract(YEAR from "InsertionDate"), extract (MONTH from "InsertionDate");
, where AdvertisingCab is a PostgreSQL view linked to a similar Clickhouse table, falls with the following error:
ERROR: clickhouse_fdw:Code: 43. DB::Exception: Illegal type DateTime('UTC') of argument of function extract: While processing extract('year', insertion_date) ASC, extract('month', insertion_date) ASC. (ILLEGAL_TYPE_OF_ARGUMENT)
QUERY:SELECT "insertion_date" FROM "test".advertising_cabinet ORDER BY extract('year', "insertion_date") ASC, extract('month', "insertion_date") ASC
In other words, clickhouse_fdw translates the extract functions in the order by clause incorrectly.
At the same time the query SELECT extract(YEAR from "InsertionDate"), extract (MONTH from "InsertionDate") from "AdvertisingCab"
translates into
QUERY PLAN
Foreign Scan on public.advertising_cabinet (cost=0.00..0.00 rows=0 width=64)
Output: EXTRACT(year FROM advertising_cabinet."insertion_date"), EXTRACT(month FROM advertising_cabinet."insertion_date")
Remote SQL: SELECT "insertion_date" FROM "test".advertising_cabinet
(3 rows)
and works perfectly.
The text was updated successfully, but these errors were encountered:
A simple query
SELECT "InsertionDate" from "AdvertisingCab" order by extract(YEAR from "InsertionDate"), extract (MONTH from "InsertionDate");
, where AdvertisingCab is a PostgreSQL view linked to a similar Clickhouse table, falls with the following error:
In other words, clickhouse_fdw translates the extract functions in the order by clause incorrectly.
At the same time the query
SELECT extract(YEAR from "InsertionDate"), extract (MONTH from "InsertionDate") from "AdvertisingCab"
translates into
and works perfectly.
The text was updated successfully, but these errors were encountered: