\unset ECHO Foreign table "agg_bin.agg_numbers" Column | Type | Collation | Nullable | Default | FDW options --------+----------+-----------+----------+---------+------------- a | smallint | | not null | | b | real | | not null | | Server: agg_bin_svr FDW options: (database 'agg_test', table_name 'agg_numbers', engine 'MergeTree') Foreign table "agg_bin.hits" Column | Type | Collation | Nullable | Default | FDW options -----------+-----------------------------+-----------+----------+---------+------------- id | bigint | | not null | | uuid | uuid | | not null | | timestamp | timestamp(6) with time zone | | not null | | datestamp | date | | not null | | path | text | | not null | | duration | bigint | | not null | | cost | numeric(10,2) | | not null | | Server: agg_bin_svr FDW options: (database 'agg_test', table_name 'hits', engine 'MergeTree') Foreign table "agg_http.agg_numbers" Column | Type | Collation | Nullable | Default | FDW options --------+----------+-----------+----------+---------+------------- a | smallint | | not null | | b | real | | not null | | Server: agg_http_svr FDW options: (database 'agg_test', table_name 'agg_numbers', engine 'MergeTree') Foreign table "agg_http.hits" Column | Type | Collation | Nullable | Default | FDW options -----------+-----------------------------+-----------+----------+---------+------------- id | bigint | | not null | | uuid | uuid | | not null | | timestamp | timestamp(6) with time zone | | not null | | datestamp | date | | not null | | path | text | | not null | | duration | bigint | | not null | | cost | numeric(10,2) | | not null | | Server: agg_http_svr FDW options: (database 'agg_test', table_name 'hits', engine 'MergeTree') -- AVG(UInt64) QUERY PLAN ------------------------------------------------------- Foreign Scan Output: (avg(id)) Relations: Aggregate on (hits) Remote SQL: SELECT avgOrNull(id) FROM agg_test.hits (4 rows) avg --------------- 2420827679.54 (1 row) QUERY PLAN ------------------------------------------------------- Foreign Scan Output: (avg(id)) Relations: Aggregate on (hits) Remote SQL: SELECT avgOrNull(id) FROM agg_test.hits (4 rows) avg --------------- 2420827679.54 (1 row) QUERY PLAN --------------------------------------------------------------------------------- Foreign Scan Output: (avg(id)) Relations: Aggregate on (hits) Remote SQL: SELECT avgOrNull(id) FROM agg_test.hits WHERE ((id < 1000000000)) (4 rows) avg ------------- 404449748.2 (1 row) QUERY PLAN --------------------------------------------------------------------------------- Foreign Scan Output: (avg(id)) Relations: Aggregate on (hits) Remote SQL: SELECT avgOrNull(id) FROM agg_test.hits WHERE ((id < 1000000000)) (4 rows) avg ------------- 404449748.2 (1 row) -- AVG(UInt32) QUERY PLAN ------------------------------------------------------------- Foreign Scan Output: (avg(duration)) Relations: Aggregate on (hits) Remote SQL: SELECT avgOrNull(duration) FROM agg_test.hits (4 rows) avg ------ 1095 (1 row) QUERY PLAN ------------------------------------------------------------- Foreign Scan Output: (avg(duration)) Relations: Aggregate on (hits) Remote SQL: SELECT avgOrNull(duration) FROM agg_test.hits (4 rows) avg ------ 1095 (1 row) QUERY PLAN --------------------------------------------------------------------------------------------- Foreign Scan Output: (avg(duration)) Relations: Aggregate on (hits) Remote SQL: SELECT avgOrNull(duration) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) avg ------ 1095 (1 row) QUERY PLAN --------------------------------------------------------------------------------------------- Foreign Scan Output: (avg(duration)) Relations: Aggregate on (hits) Remote SQL: SELECT avgOrNull(duration) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) avg ------ 1095 (1 row) -- AVG(Decimal) QUERY PLAN --------------------------------------------------------- Foreign Scan Output: (avg(cost)) Relations: Aggregate on (hits) Remote SQL: SELECT avgOrNull(cost) FROM agg_test.hits (4 rows) avg -------- 5.0768 (1 row) QUERY PLAN --------------------------------------------------------- Foreign Scan Output: (avg(cost)) Relations: Aggregate on (hits) Remote SQL: SELECT avgOrNull(cost) FROM agg_test.hits (4 rows) avg -------- 5.0768 (1 row) QUERY PLAN ------------------------------------------------------------------------------------- Foreign Scan Output: (avg(cost)) Relations: Aggregate on (hits) Remote SQL: SELECT avgOrNull(cost) FROM agg_test.hits WHERE ((cost < 1000000000)) (4 rows) avg -------- 5.0768 (1 row) QUERY PLAN ------------------------------------------------------------------------------------- Foreign Scan Output: (avg(cost)) Relations: Aggregate on (hits) Remote SQL: SELECT avgOrNull(cost) FROM agg_test.hits WHERE ((cost < 1000000000)) (4 rows) avg -------- 5.0768 (1 row) -- array_agg(UInt64) QUERY PLAN -------------------------------------------------------- Foreign Scan Output: (array_agg(id)) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(id) FROM agg_test.hits (4 rows) array_agg -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- {3498231651,1431223188,1331538905,3451631267,2757160710,4049681990,3319320102,2178896781,2433222225,3948091185,3122655508,3095867833,2720322600,2400403412,3159416553,4160213552,3910581405,3267604082,3841934465,4264738908,2005666276,3824162205,352088655,467263982,2890629064,4072815052,1008605146,837437371,3517179953,2836779925,1470995555,3849384968,3334361077,3258018379,1750004811,280308092,3231552675,392385086,287518381,1334989359,4093728327,1406653594,366963527,3432633864,104048445,914876110,1982637736,41607833,3814959307,1538392900} (1 row) QUERY PLAN -------------------------------------------------------- Foreign Scan Output: (array_agg(id)) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(id) FROM agg_test.hits (4 rows) array_agg -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- {3498231651,1431223188,1331538905,3451631267,2757160710,4049681990,3319320102,2178896781,2433222225,3948091185,3122655508,3095867833,2720322600,2400403412,3159416553,4160213552,3910581405,3267604082,3841934465,4264738908,2005666276,3824162205,352088655,467263982,2890629064,4072815052,1008605146,837437371,3517179953,2836779925,1470995555,3849384968,3334361077,3258018379,1750004811,280308092,3231552675,392385086,287518381,1334989359,4093728327,1406653594,366963527,3432633864,104048445,914876110,1982637736,41607833,3814959307,1538392900} (1 row) QUERY PLAN ---------------------------------------------------------------------------------------- Foreign Scan Output: (array_agg(id)) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(id) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) array_agg ------------------------------------------------------------------------------------------------------ {352088655,467263982,837437371,280308092,392385086,287518381,366963527,104048445,914876110,41607833} (1 row) QUERY PLAN ---------------------------------------------------------------------------------------- Foreign Scan Output: (array_agg(id)) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(id) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) array_agg ------------------------------------------------------------------------------------------------------ {352088655,467263982,837437371,280308092,392385086,287518381,366963527,104048445,914876110,41607833} (1 row) -- array_agg(UUID) QUERY PLAN ---------------------------------------------------------- Foreign Scan Output: (array_agg(uuid)) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(uuid) FROM agg_test.hits (4 rows) array_agg ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- {8cab5a51-8927-43f4-8104-b2c81ffc3d8a,691a0477-c3fa-404d-a478-d4caaaa24832,f44459f2-9bbd-4149-9ac8-69c7b22f1aa0,148181e2-a573-481f-9e2a-02441d523034,974f2e1d-6918-4cce-935c-d445428584cc,720ad53d-db83-4091-a262-cfc7347f96ae,b623608d-459d-43d2-90ac-d1a8de83ff17,d205ee5d-dd47-4a63-be2f-198fcfb7403b,1f1dd4dd-2b05-4876-b98c-cb5ba1f34b89,a77b5881-262a-47c4-8494-a211e48b9c6c,aef92b53-0b2a-4777-8d9d-ce5a6443ef54,99f9a13a-357a-40fd-b415-1966865468d3,5c740ee9-a7a2-43e4-8ab1-e8c147f78c8b,d12fe0f1-9c4c-4039-9027-3e9f62d1da54,7885ab07-3740-461f-ac0c-c8732c07d86e,031a4434-e4f8-465d-8b13-7537ad578e93,1c0f3511-3f88-4d4a-a053-724449619420,d60a7c1d-dccf-427b-b685-9a6077a88867,c066fdd6-0172-46aa-9792-63455cb069b4,9f420aa6-f015-4caa-a2f8-2ca0e7a652a6,b8615e95-f95f-458e-aa87-b6e6634503d9,06fa959e-afe3-414d-9771-650547091079,f5468669-4391-4ed7-99be-82061f8f3f93,77af0ea8-2fef-4a21-bee0-335f9aa995c6,368679e8-8f2a-47dd-8bce-b491bdd09720,90b90c80-8f8e-44e1-9468-e4d2cddd22bb,6da3afd4-4fa3-49b7-ab29-ffe1b2bb7082,b5628648-e429-4fb9-9d77-de539d32f29f,3e4b5d8b-7b09-4d1c-9eb4-855f0ae108d2,5e57a6fe-0196-4100-865a-7d6dc55765c2,0d8c0e39-679f-4034-b48f-aa1595b02dfc,533582ce-95eb-4fb6-804e-6256ea6adaac,a04b2cbd-c5b9-4f65-8449-0827d6c7f712,d5c34dc5-b5db-455d-9528-fe466bdadd2c,eda72c6e-3161-47dd-ba25-cf059bb995da,68b5127e-9819-453f-812d-f1b90979f872,4886ebda-a378-4181-a291-c235ec1047a8,69229156-bb5a-450d-91a0-474f39a20bab,1adf4190-5147-4e7e-b354-7715a5a81c40,52220ad9-02f0-4ad7-ad74-dc6add362a99,44cccdf8-d398-40c7-9e41-117a37e93b9e,e636df93-8421-4926-bf6f-1d1ee36edd35,af62cc2f-e706-4d1d-a740-fd80c55a1250,b50622a5-0e0a-4f66-8be1-84c7cc6851b6,19b74725-9827-4d84-b4dc-b86788193002,2ddfb5b7-9ae5-428b-9351-48e823230672,969e2c53-c735-4649-a6a3-3107ed089cb0,ad89a796-f7c6-4549-bd2e-ced0e586a5a5,70525fca-b870-4976-9377-fc959353302a,7e3f2fe1-5312-4257-ba3e-54662ba14b56} (1 row) QUERY PLAN ---------------------------------------------------------- Foreign Scan Output: (array_agg(uuid)) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(uuid) FROM agg_test.hits (4 rows) array_agg ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- {8cab5a51-8927-43f4-8104-b2c81ffc3d8a,691a0477-c3fa-404d-a478-d4caaaa24832,f44459f2-9bbd-4149-9ac8-69c7b22f1aa0,148181e2-a573-481f-9e2a-02441d523034,974f2e1d-6918-4cce-935c-d445428584cc,720ad53d-db83-4091-a262-cfc7347f96ae,b623608d-459d-43d2-90ac-d1a8de83ff17,d205ee5d-dd47-4a63-be2f-198fcfb7403b,1f1dd4dd-2b05-4876-b98c-cb5ba1f34b89,a77b5881-262a-47c4-8494-a211e48b9c6c,aef92b53-0b2a-4777-8d9d-ce5a6443ef54,99f9a13a-357a-40fd-b415-1966865468d3,5c740ee9-a7a2-43e4-8ab1-e8c147f78c8b,d12fe0f1-9c4c-4039-9027-3e9f62d1da54,7885ab07-3740-461f-ac0c-c8732c07d86e,031a4434-e4f8-465d-8b13-7537ad578e93,1c0f3511-3f88-4d4a-a053-724449619420,d60a7c1d-dccf-427b-b685-9a6077a88867,c066fdd6-0172-46aa-9792-63455cb069b4,9f420aa6-f015-4caa-a2f8-2ca0e7a652a6,b8615e95-f95f-458e-aa87-b6e6634503d9,06fa959e-afe3-414d-9771-650547091079,f5468669-4391-4ed7-99be-82061f8f3f93,77af0ea8-2fef-4a21-bee0-335f9aa995c6,368679e8-8f2a-47dd-8bce-b491bdd09720,90b90c80-8f8e-44e1-9468-e4d2cddd22bb,6da3afd4-4fa3-49b7-ab29-ffe1b2bb7082,b5628648-e429-4fb9-9d77-de539d32f29f,3e4b5d8b-7b09-4d1c-9eb4-855f0ae108d2,5e57a6fe-0196-4100-865a-7d6dc55765c2,0d8c0e39-679f-4034-b48f-aa1595b02dfc,533582ce-95eb-4fb6-804e-6256ea6adaac,a04b2cbd-c5b9-4f65-8449-0827d6c7f712,d5c34dc5-b5db-455d-9528-fe466bdadd2c,eda72c6e-3161-47dd-ba25-cf059bb995da,68b5127e-9819-453f-812d-f1b90979f872,4886ebda-a378-4181-a291-c235ec1047a8,69229156-bb5a-450d-91a0-474f39a20bab,1adf4190-5147-4e7e-b354-7715a5a81c40,52220ad9-02f0-4ad7-ad74-dc6add362a99,44cccdf8-d398-40c7-9e41-117a37e93b9e,e636df93-8421-4926-bf6f-1d1ee36edd35,af62cc2f-e706-4d1d-a740-fd80c55a1250,b50622a5-0e0a-4f66-8be1-84c7cc6851b6,19b74725-9827-4d84-b4dc-b86788193002,2ddfb5b7-9ae5-428b-9351-48e823230672,969e2c53-c735-4649-a6a3-3107ed089cb0,ad89a796-f7c6-4549-bd2e-ced0e586a5a5,70525fca-b870-4976-9377-fc959353302a,7e3f2fe1-5312-4257-ba3e-54662ba14b56} (1 row) QUERY PLAN ------------------------------------------------------------------------------------------ Foreign Scan Output: (array_agg(uuid)) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(uuid) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) array_agg ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- {f5468669-4391-4ed7-99be-82061f8f3f93,77af0ea8-2fef-4a21-bee0-335f9aa995c6,b5628648-e429-4fb9-9d77-de539d32f29f,68b5127e-9819-453f-812d-f1b90979f872,69229156-bb5a-450d-91a0-474f39a20bab,1adf4190-5147-4e7e-b354-7715a5a81c40,af62cc2f-e706-4d1d-a740-fd80c55a1250,19b74725-9827-4d84-b4dc-b86788193002,2ddfb5b7-9ae5-428b-9351-48e823230672,ad89a796-f7c6-4549-bd2e-ced0e586a5a5} (1 row) QUERY PLAN ------------------------------------------------------------------------------------------ Foreign Scan Output: (array_agg(uuid)) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(uuid) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) array_agg ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- {f5468669-4391-4ed7-99be-82061f8f3f93,77af0ea8-2fef-4a21-bee0-335f9aa995c6,b5628648-e429-4fb9-9d77-de539d32f29f,68b5127e-9819-453f-812d-f1b90979f872,69229156-bb5a-450d-91a0-474f39a20bab,1adf4190-5147-4e7e-b354-7715a5a81c40,af62cc2f-e706-4d1d-a740-fd80c55a1250,19b74725-9827-4d84-b4dc-b86788193002,2ddfb5b7-9ae5-428b-9351-48e823230672,ad89a796-f7c6-4549-bd2e-ced0e586a5a5} (1 row) -- array_agg(DateTime64) QUERY PLAN --------------------------------------------------------------- Foreign Scan Output: (array_agg("timestamp")) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(timestamp) FROM agg_test.hits (4 rows) array_agg ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ {"2025-12-05 11:51:04.390884+00","2025-12-05 12:22:20.135213+00","2025-12-05 14:31:50.452533+00","2025-12-05 19:06:00.126014+00","2025-12-05 19:07:10.399278+00","2025-12-05 20:07:22.673831+00","2025-12-06 03:25:34.627161+00","2025-12-06 05:50:56.818572+00","2025-12-06 13:02:50.972837+00","2025-12-07 15:42:06.88149+00","2025-12-07 17:28:58.124117+00","2025-12-07 23:20:36.618385+00","2025-12-08 01:59:58.417052+00","2025-12-08 03:00:24.806643+00","2025-12-08 14:42:58.34422+00","2025-12-08 20:14:32.23635+00","2025-12-09 00:08:20.392948+00","2025-12-10 00:39:44.518284+00","2025-12-10 00:49:32.950914+00","2025-12-10 04:57:48.584719+00","2025-12-10 09:29:52.666577+00","2025-12-10 13:40:28.486178+00","2025-12-10 16:24:16.877779+00","2025-12-12 09:52:04.236867+00","2025-12-12 20:46:06.572602+00","2025-12-12 23:50:54.686406+00","2025-12-13 06:58:08.868876+00","2025-12-13 10:27:26.390655+00","2025-12-13 14:15:10.219085+00","2025-12-13 14:54:36.17439+00","2025-12-13 17:08:04.502729+00","2025-12-13 18:05:14.46441+00","2025-12-13 21:09:06.290341+00","2025-12-14 11:21:28.869821+00","2025-12-14 17:21:16.478761+00","2025-12-14 22:32:04.449588+00","2025-12-15 07:35:16.55788+00","2025-12-15 16:41:30.608217+00","2025-12-15 17:07:24.893024+00","2025-12-15 18:34:26.171566+00","2025-12-15 21:17:32.577173+00","2025-12-16 09:13:10.107266+00","2025-12-16 10:11:58.434566+00","2025-12-16 13:04:10.855999+00","2025-12-16 16:17:36.473802+00","2025-12-17 02:07:56.978358+00","2025-12-17 11:09:02.207676+00","2025-12-18 16:36:18.43735+00","2025-12-18 22:57:20.264686+00","2025-12-19 07:24:50.960198+00"} (1 row) QUERY PLAN --------------------------------------------------------------- Foreign Scan Output: (array_agg("timestamp")) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(timestamp) FROM agg_test.hits (4 rows) array_agg ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ {"2025-12-05 11:51:04.390884+00","2025-12-05 12:22:20.135213+00","2025-12-05 14:31:50.452533+00","2025-12-05 19:06:00.126014+00","2025-12-05 19:07:10.399278+00","2025-12-05 20:07:22.673831+00","2025-12-06 03:25:34.627161+00","2025-12-06 05:50:56.818572+00","2025-12-06 13:02:50.972837+00","2025-12-07 15:42:06.88149+00","2025-12-07 17:28:58.124117+00","2025-12-07 23:20:36.618385+00","2025-12-08 01:59:58.417052+00","2025-12-08 03:00:24.806643+00","2025-12-08 14:42:58.34422+00","2025-12-08 20:14:32.23635+00","2025-12-09 00:08:20.392948+00","2025-12-10 00:39:44.518284+00","2025-12-10 00:49:32.950914+00","2025-12-10 04:57:48.584719+00","2025-12-10 09:29:52.666577+00","2025-12-10 13:40:28.486178+00","2025-12-10 16:24:16.877779+00","2025-12-12 09:52:04.236867+00","2025-12-12 20:46:06.572602+00","2025-12-12 23:50:54.686406+00","2025-12-13 06:58:08.868876+00","2025-12-13 10:27:26.390655+00","2025-12-13 14:15:10.219085+00","2025-12-13 14:54:36.17439+00","2025-12-13 17:08:04.502729+00","2025-12-13 18:05:14.46441+00","2025-12-13 21:09:06.290341+00","2025-12-14 11:21:28.869821+00","2025-12-14 17:21:16.478761+00","2025-12-14 22:32:04.449588+00","2025-12-15 07:35:16.55788+00","2025-12-15 16:41:30.608217+00","2025-12-15 17:07:24.893024+00","2025-12-15 18:34:26.171566+00","2025-12-15 21:17:32.577173+00","2025-12-16 09:13:10.107266+00","2025-12-16 10:11:58.434566+00","2025-12-16 13:04:10.855999+00","2025-12-16 16:17:36.473802+00","2025-12-17 02:07:56.978358+00","2025-12-17 11:09:02.207676+00","2025-12-18 16:36:18.43735+00","2025-12-18 22:57:20.264686+00","2025-12-19 07:24:50.960198+00"} (1 row) QUERY PLAN ----------------------------------------------------------------------------------------------- Foreign Scan Output: (array_agg("timestamp")) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(timestamp) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) array_agg ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- {"2025-12-10 16:24:16.877779+00","2025-12-12 09:52:04.236867+00","2025-12-13 10:27:26.390655+00","2025-12-14 22:32:04.449588+00","2025-12-15 16:41:30.608217+00","2025-12-15 17:07:24.893024+00","2025-12-16 10:11:58.434566+00","2025-12-16 16:17:36.473802+00","2025-12-17 02:07:56.978358+00","2025-12-18 16:36:18.43735+00"} (1 row) QUERY PLAN ----------------------------------------------------------------------------------------------- Foreign Scan Output: (array_agg("timestamp")) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(timestamp) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) array_agg ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- {"2025-12-10 16:24:16.877779+00","2025-12-12 09:52:04.236867+00","2025-12-13 10:27:26.390655+00","2025-12-14 22:32:04.449588+00","2025-12-15 16:41:30.608217+00","2025-12-15 17:07:24.893024+00","2025-12-16 10:11:58.434566+00","2025-12-16 16:17:36.473802+00","2025-12-17 02:07:56.978358+00","2025-12-18 16:36:18.43735+00"} (1 row) -- array_agg(Date) QUERY PLAN --------------------------------------------------------------- Foreign Scan Output: (array_agg(datestamp)) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(datestamp) FROM agg_test.hits (4 rows) array_agg ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- {2025-12-05,2025-12-05,2025-12-05,2025-12-05,2025-12-05,2025-12-05,2025-12-06,2025-12-06,2025-12-06,2025-12-07,2025-12-07,2025-12-07,2025-12-08,2025-12-08,2025-12-08,2025-12-08,2025-12-09,2025-12-10,2025-12-10,2025-12-10,2025-12-10,2025-12-10,2025-12-10,2025-12-12,2025-12-12,2025-12-12,2025-12-13,2025-12-13,2025-12-13,2025-12-13,2025-12-13,2025-12-13,2025-12-13,2025-12-14,2025-12-14,2025-12-14,2025-12-15,2025-12-15,2025-12-15,2025-12-15,2025-12-15,2025-12-16,2025-12-16,2025-12-16,2025-12-16,2025-12-17,2025-12-17,2025-12-18,2025-12-18,2025-12-19} (1 row) QUERY PLAN --------------------------------------------------------------- Foreign Scan Output: (array_agg(datestamp)) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(datestamp) FROM agg_test.hits (4 rows) array_agg ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- {2025-12-05,2025-12-05,2025-12-05,2025-12-05,2025-12-05,2025-12-05,2025-12-06,2025-12-06,2025-12-06,2025-12-07,2025-12-07,2025-12-07,2025-12-08,2025-12-08,2025-12-08,2025-12-08,2025-12-09,2025-12-10,2025-12-10,2025-12-10,2025-12-10,2025-12-10,2025-12-10,2025-12-12,2025-12-12,2025-12-12,2025-12-13,2025-12-13,2025-12-13,2025-12-13,2025-12-13,2025-12-13,2025-12-13,2025-12-14,2025-12-14,2025-12-14,2025-12-15,2025-12-15,2025-12-15,2025-12-15,2025-12-15,2025-12-16,2025-12-16,2025-12-16,2025-12-16,2025-12-17,2025-12-17,2025-12-18,2025-12-18,2025-12-19} (1 row) QUERY PLAN ----------------------------------------------------------------------------------------------- Foreign Scan Output: (array_agg(datestamp)) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(datestamp) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) array_agg ----------------------------------------------------------------------------------------------------------------- {2025-12-10,2025-12-12,2025-12-13,2025-12-14,2025-12-15,2025-12-15,2025-12-16,2025-12-16,2025-12-17,2025-12-18} (1 row) QUERY PLAN ----------------------------------------------------------------------------------------------- Foreign Scan Output: (array_agg(datestamp)) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(datestamp) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) array_agg ----------------------------------------------------------------------------------------------------------------- {2025-12-10,2025-12-12,2025-12-13,2025-12-14,2025-12-15,2025-12-15,2025-12-16,2025-12-16,2025-12-17,2025-12-18} (1 row) -- array_agg(String) QUERY PLAN ---------------------------------------------------------- Foreign Scan Output: (array_agg(path)) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(path) FROM agg_test.hits (4 rows) array_agg ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- {/users/283434,/users/802683,/search,/users/283434,/users/7392323,/users/7392323,/users/7392323,/widgets/voluptatem,/users,/users,/users/802683,/search,/search,/users/802683,/search,/profile,/widgets/voluptatem,/users/1321945,/users,/widgets/natus,/users/802683,/widgets/voluptatem,/widgets/aperiam,/widgets/totam,/search,/widgets/natus,/search,/widgets/omnis,/users,/users/1739238,/users/283434,/search,/users/1739238,/widgets/omnis,/widgets/omnis,/widgets/natus,/users/283434,/widgets/totam,/widgets/voluptatem,/widgets/aperiam,/widgets,/search,/widgets,/search,/widgets/voluptatem,/widgets/totam,/search,/search,/widgets/omnis,/users/802683} (1 row) QUERY PLAN ---------------------------------------------------------- Foreign Scan Output: (array_agg(path)) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(path) FROM agg_test.hits (4 rows) array_agg ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- {/users/283434,/users/802683,/search,/users/283434,/users/7392323,/users/7392323,/users/7392323,/widgets/voluptatem,/users,/users,/users/802683,/search,/search,/users/802683,/search,/profile,/widgets/voluptatem,/users/1321945,/users,/widgets/natus,/users/802683,/widgets/voluptatem,/widgets/aperiam,/widgets/totam,/search,/widgets/natus,/search,/widgets/omnis,/users,/users/1739238,/users/283434,/search,/users/1739238,/widgets/omnis,/widgets/omnis,/widgets/natus,/users/283434,/widgets/totam,/widgets/voluptatem,/widgets/aperiam,/widgets,/search,/widgets,/search,/widgets/voluptatem,/widgets/totam,/search,/search,/widgets/omnis,/users/802683} (1 row) QUERY PLAN ------------------------------------------------------------------------------------------ Foreign Scan Output: (array_agg(path)) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(path) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) array_agg -------------------------------------------------------------------------------------------------------------------------------------------------------- {/widgets/aperiam,/widgets/totam,/widgets/omnis,/widgets/natus,/widgets/totam,/widgets/voluptatem,/widgets,/widgets/voluptatem,/widgets/totam,/search} (1 row) QUERY PLAN ------------------------------------------------------------------------------------------ Foreign Scan Output: (array_agg(path)) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(path) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) array_agg -------------------------------------------------------------------------------------------------------------------------------------------------------- {/widgets/aperiam,/widgets/totam,/widgets/omnis,/widgets/natus,/widgets/totam,/widgets/voluptatem,/widgets,/widgets/voluptatem,/widgets/totam,/search} (1 row) -- array_agg(UInt32) QUERY PLAN -------------------------------------------------------------- Foreign Scan Output: (array_agg(duration)) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(duration) FROM agg_test.hits (4 rows) array_agg -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- {304,541,599,1829,87,243,615,298,1409,83,1332,2011,84,3542,234,48,2498,1784,9,2556,772,253,64,1056,14,148,963,226,2125,3839,4437,2,2,2092,2478,15,1268,66,7672,54,3,81,916,4990,501,31,165,47,148,216} (1 row) QUERY PLAN -------------------------------------------------------------- Foreign Scan Output: (array_agg(duration)) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(duration) FROM agg_test.hits (4 rows) array_agg -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- {304,541,599,1829,87,243,615,298,1409,83,1332,2011,84,3542,234,48,2498,1784,9,2556,772,253,64,1056,14,148,963,226,2125,3839,4437,2,2,2092,2478,15,1268,66,7672,54,3,81,916,4990,501,31,165,47,148,216} (1 row) QUERY PLAN ---------------------------------------------------------------------------------------------- Foreign Scan Output: (array_agg(duration)) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(duration) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) array_agg ---------------------------------------- {64,1056,226,15,66,7672,916,501,31,47} (1 row) QUERY PLAN ---------------------------------------------------------------------------------------------- Foreign Scan Output: (array_agg(duration)) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(duration) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) array_agg ---------------------------------------- {64,1056,226,15,66,7672,916,501,31,47} (1 row) -- array_agg(Decimal) QUERY PLAN ---------------------------------------------------------- Foreign Scan Output: (array_agg(cost)) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(cost) FROM agg_test.hits (4 rows) array_agg ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- {1.29,8.38,4.28,6.51,2.15,3.02,5.94,2.98,5.60,7.01,4.26,7.40,7.55,2.34,7.57,5.66,2.61,3.51,3.52,4.43,5.55,5.24,5.10,1.99,1.81,6.80,3.54,8.14,8.21,4.55,1.33,7.42,2.23,5.24,6.04,8.53,4.43,3.57,2.47,1.20,3.55,8.17,8.24,2.36,4.79,6.75,8.90,7.69,8.09,5.90} (1 row) QUERY PLAN ---------------------------------------------------------- Foreign Scan Output: (array_agg(cost)) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(cost) FROM agg_test.hits (4 rows) array_agg ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- {1.29,8.38,4.28,6.51,2.15,3.02,5.94,2.98,5.60,7.01,4.26,7.40,7.55,2.34,7.57,5.66,2.61,3.51,3.52,4.43,5.55,5.24,5.10,1.99,1.81,6.80,3.54,8.14,8.21,4.55,1.33,7.42,2.23,5.24,6.04,8.53,4.43,3.57,2.47,1.20,3.55,8.17,8.24,2.36,4.79,6.75,8.90,7.69,8.09,5.90} (1 row) QUERY PLAN -------------------------------------------------------------------------------------- Foreign Scan Output: (array_agg(cost)) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(cost) FROM agg_test.hits WHERE ((cost < 1000000000)) (4 rows) array_agg ----------------------------------------------------- {5.10,1.99,8.14,8.53,3.57,2.47,8.24,4.79,6.75,7.69} (1 row) QUERY PLAN -------------------------------------------------------------------------------------- Foreign Scan Output: (array_agg(cost)) Relations: Aggregate on (hits) Remote SQL: SELECT groupArray(cost) FROM agg_test.hits WHERE ((cost < 1000000000)) (4 rows) array_agg ----------------------------------------------------- {5.10,1.99,8.14,8.53,3.57,2.47,8.24,4.79,6.75,7.69} (1 row) -- min(UInt64) QUERY PLAN ------------------------------------------------------- Foreign Scan Output: (min(id)) Relations: Aggregate on (hits) Remote SQL: SELECT minOrNull(id) FROM agg_test.hits (4 rows) min ---------- 41607833 (1 row) QUERY PLAN ------------------------------------------------------- Foreign Scan Output: (min(id)) Relations: Aggregate on (hits) Remote SQL: SELECT minOrNull(id) FROM agg_test.hits (4 rows) min ---------- 41607833 (1 row) QUERY PLAN --------------------------------------------------------------------------------------- Foreign Scan Output: (min(id)) Relations: Aggregate on (hits) Remote SQL: SELECT minOrNull(id) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) min ---------- 41607833 (1 row) QUERY PLAN --------------------------------------------------------------------------------------- Foreign Scan Output: (min(id)) Relations: Aggregate on (hits) Remote SQL: SELECT minOrNull(id) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) min ---------- 41607833 (1 row) -- min(DateTime64) QUERY PLAN -------------------------------------------------------------- Foreign Scan Output: (min("timestamp")) Relations: Aggregate on (hits) Remote SQL: SELECT minOrNull(timestamp) FROM agg_test.hits (4 rows) min ------------------------------- 2025-12-05 11:51:04.390884+00 (1 row) QUERY PLAN -------------------------------------------------------------- Foreign Scan Output: (min("timestamp")) Relations: Aggregate on (hits) Remote SQL: SELECT minOrNull(timestamp) FROM agg_test.hits (4 rows) min ------------------------------- 2025-12-05 11:51:04.390884+00 (1 row) QUERY PLAN ---------------------------------------------------------------------------------------------- Foreign Scan Output: (min("timestamp")) Relations: Aggregate on (hits) Remote SQL: SELECT minOrNull(timestamp) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) min ------------------------------- 2025-12-10 16:24:16.877779+00 (1 row) QUERY PLAN ---------------------------------------------------------------------------------------------- Foreign Scan Output: (min("timestamp")) Relations: Aggregate on (hits) Remote SQL: SELECT minOrNull(timestamp) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) min ------------------------------- 2025-12-10 16:24:16.877779+00 (1 row) -- min(Date) QUERY PLAN -------------------------------------------------------------- Foreign Scan Output: (min(datestamp)) Relations: Aggregate on (hits) Remote SQL: SELECT minOrNull(datestamp) FROM agg_test.hits (4 rows) min ------------ 2025-12-05 (1 row) QUERY PLAN -------------------------------------------------------------- Foreign Scan Output: (min(datestamp)) Relations: Aggregate on (hits) Remote SQL: SELECT minOrNull(datestamp) FROM agg_test.hits (4 rows) min ------------ 2025-12-05 (1 row) QUERY PLAN ---------------------------------------------------------------------------------------------- Foreign Scan Output: (min(datestamp)) Relations: Aggregate on (hits) Remote SQL: SELECT minOrNull(datestamp) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) min ------------ 2025-12-10 (1 row) QUERY PLAN ---------------------------------------------------------------------------------------------- Foreign Scan Output: (min(datestamp)) Relations: Aggregate on (hits) Remote SQL: SELECT minOrNull(datestamp) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) min ------------ 2025-12-10 (1 row) -- min(String) QUERY PLAN --------------------------------------------------------- Foreign Scan Output: (min(path)) Relations: Aggregate on (hits) Remote SQL: SELECT minOrNull(path) FROM agg_test.hits (4 rows) min ---------- /profile (1 row) QUERY PLAN --------------------------------------------------------- Foreign Scan Output: (min(path)) Relations: Aggregate on (hits) Remote SQL: SELECT minOrNull(path) FROM agg_test.hits (4 rows) min ---------- /profile (1 row) QUERY PLAN ----------------------------------------------------------------------------------------- Foreign Scan Output: (min(path)) Relations: Aggregate on (hits) Remote SQL: SELECT minOrNull(path) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) min --------- /search (1 row) QUERY PLAN ----------------------------------------------------------------------------------------- Foreign Scan Output: (min(path)) Relations: Aggregate on (hits) Remote SQL: SELECT minOrNull(path) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) min --------- /search (1 row) -- min(UInt32) QUERY PLAN ------------------------------------------------------------- Foreign Scan Output: (min(duration)) Relations: Aggregate on (hits) Remote SQL: SELECT minOrNull(duration) FROM agg_test.hits (4 rows) min ----- 2 (1 row) QUERY PLAN ------------------------------------------------------------- Foreign Scan Output: (min(duration)) Relations: Aggregate on (hits) Remote SQL: SELECT minOrNull(duration) FROM agg_test.hits (4 rows) min ----- 2 (1 row) QUERY PLAN --------------------------------------------------------------------------------------------- Foreign Scan Output: (min(duration)) Relations: Aggregate on (hits) Remote SQL: SELECT minOrNull(duration) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) min ----- 15 (1 row) QUERY PLAN --------------------------------------------------------------------------------------------- Foreign Scan Output: (min(duration)) Relations: Aggregate on (hits) Remote SQL: SELECT minOrNull(duration) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) min ----- 15 (1 row) -- min(Decimal) QUERY PLAN --------------------------------------------------------- Foreign Scan Output: (min(cost)) Relations: Aggregate on (hits) Remote SQL: SELECT minOrNull(cost) FROM agg_test.hits (4 rows) min ------ 1.20 (1 row) QUERY PLAN --------------------------------------------------------- Foreign Scan Output: (min(cost)) Relations: Aggregate on (hits) Remote SQL: SELECT minOrNull(cost) FROM agg_test.hits (4 rows) min ------ 1.20 (1 row) QUERY PLAN ------------------------------------------------------------------------------------- Foreign Scan Output: (min(cost)) Relations: Aggregate on (hits) Remote SQL: SELECT minOrNull(cost) FROM agg_test.hits WHERE ((cost < 1000000000)) (4 rows) min ------ 1.99 (1 row) QUERY PLAN ------------------------------------------------------------------------------------- Foreign Scan Output: (min(cost)) Relations: Aggregate on (hits) Remote SQL: SELECT minOrNull(cost) FROM agg_test.hits WHERE ((cost < 1000000000)) (4 rows) min ------ 1.99 (1 row) -- max(UInt64) QUERY PLAN ------------------------------------------------------- Foreign Scan Output: (max(id)) Relations: Aggregate on (hits) Remote SQL: SELECT maxOrNull(id) FROM agg_test.hits (4 rows) max ------------ 4264738908 (1 row) QUERY PLAN ------------------------------------------------------- Foreign Scan Output: (max(id)) Relations: Aggregate on (hits) Remote SQL: SELECT maxOrNull(id) FROM agg_test.hits (4 rows) max ------------ 4264738908 (1 row) QUERY PLAN --------------------------------------------------------------------------------------- Foreign Scan Output: (max(id)) Relations: Aggregate on (hits) Remote SQL: SELECT maxOrNull(id) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) max ----------- 914876110 (1 row) QUERY PLAN --------------------------------------------------------------------------------------- Foreign Scan Output: (max(id)) Relations: Aggregate on (hits) Remote SQL: SELECT maxOrNull(id) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) max ----------- 914876110 (1 row) -- max(DateTime64) QUERY PLAN -------------------------------------------------------------- Foreign Scan Output: (max("timestamp")) Relations: Aggregate on (hits) Remote SQL: SELECT maxOrNull(timestamp) FROM agg_test.hits (4 rows) max ------------------------------- 2025-12-19 07:24:50.960198+00 (1 row) QUERY PLAN -------------------------------------------------------------- Foreign Scan Output: (max("timestamp")) Relations: Aggregate on (hits) Remote SQL: SELECT maxOrNull(timestamp) FROM agg_test.hits (4 rows) max ------------------------------- 2025-12-19 07:24:50.960198+00 (1 row) QUERY PLAN ---------------------------------------------------------------------------------------------- Foreign Scan Output: (max("timestamp")) Relations: Aggregate on (hits) Remote SQL: SELECT maxOrNull(timestamp) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) max ------------------------------ 2025-12-18 16:36:18.43735+00 (1 row) QUERY PLAN ---------------------------------------------------------------------------------------------- Foreign Scan Output: (max("timestamp")) Relations: Aggregate on (hits) Remote SQL: SELECT maxOrNull(timestamp) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) max ------------------------------ 2025-12-18 16:36:18.43735+00 (1 row) -- max(Date) QUERY PLAN -------------------------------------------------------------- Foreign Scan Output: (max(datestamp)) Relations: Aggregate on (hits) Remote SQL: SELECT maxOrNull(datestamp) FROM agg_test.hits (4 rows) max ------------ 2025-12-19 (1 row) QUERY PLAN -------------------------------------------------------------- Foreign Scan Output: (max(datestamp)) Relations: Aggregate on (hits) Remote SQL: SELECT maxOrNull(datestamp) FROM agg_test.hits (4 rows) max ------------ 2025-12-19 (1 row) QUERY PLAN ---------------------------------------------------------------------------------------------- Foreign Scan Output: (max(datestamp)) Relations: Aggregate on (hits) Remote SQL: SELECT maxOrNull(datestamp) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) max ------------ 2025-12-18 (1 row) QUERY PLAN ---------------------------------------------------------------------------------------------- Foreign Scan Output: (max(datestamp)) Relations: Aggregate on (hits) Remote SQL: SELECT maxOrNull(datestamp) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) max ------------ 2025-12-18 (1 row) -- max(String) QUERY PLAN --------------------------------------------------------- Foreign Scan Output: (max(path)) Relations: Aggregate on (hits) Remote SQL: SELECT maxOrNull(path) FROM agg_test.hits (4 rows) max --------------------- /widgets/voluptatem (1 row) QUERY PLAN --------------------------------------------------------- Foreign Scan Output: (max(path)) Relations: Aggregate on (hits) Remote SQL: SELECT maxOrNull(path) FROM agg_test.hits (4 rows) max --------------------- /widgets/voluptatem (1 row) QUERY PLAN ----------------------------------------------------------------------------------------- Foreign Scan Output: (max(path)) Relations: Aggregate on (hits) Remote SQL: SELECT maxOrNull(path) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) max --------------------- /widgets/voluptatem (1 row) QUERY PLAN ----------------------------------------------------------------------------------------- Foreign Scan Output: (max(path)) Relations: Aggregate on (hits) Remote SQL: SELECT maxOrNull(path) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) max --------------------- /widgets/voluptatem (1 row) -- max(UInt32) QUERY PLAN ------------------------------------------------------------- Foreign Scan Output: (max(duration)) Relations: Aggregate on (hits) Remote SQL: SELECT maxOrNull(duration) FROM agg_test.hits (4 rows) max ------ 7672 (1 row) QUERY PLAN ------------------------------------------------------------- Foreign Scan Output: (max(duration)) Relations: Aggregate on (hits) Remote SQL: SELECT maxOrNull(duration) FROM agg_test.hits (4 rows) max ------ 7672 (1 row) QUERY PLAN --------------------------------------------------------------------------------------------- Foreign Scan Output: (max(duration)) Relations: Aggregate on (hits) Remote SQL: SELECT maxOrNull(duration) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) max ------ 7672 (1 row) QUERY PLAN --------------------------------------------------------------------------------------------- Foreign Scan Output: (max(duration)) Relations: Aggregate on (hits) Remote SQL: SELECT maxOrNull(duration) FROM agg_test.hits WHERE ((duration < 1000000000)) (4 rows) max ------ 7672 (1 row) -- max(Decimal) QUERY PLAN --------------------------------------------------------- Foreign Scan Output: (max(cost)) Relations: Aggregate on (hits) Remote SQL: SELECT maxOrNull(cost) FROM agg_test.hits (4 rows) max ------ 8.90 (1 row) QUERY PLAN --------------------------------------------------------- Foreign Scan Output: (max(cost)) Relations: Aggregate on (hits) Remote SQL: SELECT maxOrNull(cost) FROM agg_test.hits (4 rows) max ------ 8.90 (1 row) QUERY PLAN ------------------------------------------------------------------------------------- Foreign Scan Output: (max(cost)) Relations: Aggregate on (hits) Remote SQL: SELECT maxOrNull(cost) FROM agg_test.hits WHERE ((cost < 1000000000)) (4 rows) max ------ 8.53 (1 row) QUERY PLAN ------------------------------------------------------------------------------------- Foreign Scan Output: (max(cost)) Relations: Aggregate on (hits) Remote SQL: SELECT maxOrNull(cost) FROM agg_test.hits WHERE ((cost < 1000000000)) (4 rows) max ------ 8.53 (1 row) -- string_agg pushdown (binary) QUERY PLAN --------------------------------------------------------------------------------------------------------- Foreign Scan Output: (string_agg(path, '|'::text)) Relations: Aggregate on (hits) Remote SQL: SELECT groupConcatOrNull('|')(path) FROM agg_test.hits WHERE ((datestamp = '2025-12-05')) (4 rows) ERROR: pg_clickhouse: DB::Exception: Unknown function groupConcatOrNull: While processing SELECT groupConcatOrNull('|')(path) FROM agg_test.hits WHERE datestamp = '2025-12-05' DETAIL: Remote Query: SELECT groupConcatOrNull('|')(path) FROM agg_test.hits WHERE ((datestamp = '2025-12-05')) -- string_agg pushdown (http) QUERY PLAN -------------------------------------------------------------------------------------------------------- Foreign Scan Output: (string_agg(path, ''::text)) Relations: Aggregate on (hits) Remote SQL: SELECT groupConcatOrNull('')(path) FROM agg_test.hits WHERE ((datestamp = '2025-12-05')) (4 rows) ERROR: pg_clickhouse: Code: 46. DB::Exception: Unknown function groupConcatOrNull: While processing SELECT groupConcatOrNull('')(path) FROM agg_test.hits WHERE datestamp = '2025-12-05'. (UNKNOWN_FUNCTION) DETAIL: Remote Query: SELECT groupConcatOrNull('')(path) FROM agg_test.hits WHERE ((datestamp = '2025-12-05')) CONTEXT: HTTP status code: 404 -- string_agg DISTINCT pushdown (binary) QUERY PLAN ------------------------------------------------------------------------------------------------------------------- Foreign Scan Output: (string_agg(DISTINCT path, ', '::text)) Relations: Aggregate on (hits) Remote SQL: SELECT groupConcatOrNull(', ')(DISTINCT path) FROM agg_test.hits WHERE ((datestamp = '2025-12-05')) (4 rows) -- string_agg with ORDER BY falls back to local execution QUERY PLAN -------------------------------------------------------------------------------------------------------------------- Aggregate Output: string_agg(path, ', '::text ORDER BY path) -> Foreign Scan on agg_bin.hits Output: id, uuid, "timestamp", datestamp, path, duration, cost Remote SQL: SELECT path FROM agg_test.hits WHERE ((datestamp = '2025-12-05')) ORDER BY path ASC NULLS LAST (5 rows) -- array_agg with ORDER BY falls back to local execution QUERY PLAN ---------------------------------------------------------------------------------------------------------------------- Aggregate Output: array_agg(path ORDER BY path DESC) -> Foreign Scan on agg_bin.hits Output: id, uuid, "timestamp", datestamp, path, duration, cost Remote SQL: SELECT path FROM agg_test.hits WHERE ((datestamp = '2025-12-05')) ORDER BY path DESC NULLS FIRST (5 rows) -- string_agg per-group pushdown (binary) QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Foreign Scan Output: datestamp, (string_agg(path, ', '::text)) Relations: Aggregate on (hits) Remote SQL: SELECT datestamp, groupConcat(', ')(path) FROM agg_test.hits WHERE ((datestamp >= '2025-12-05')) AND ((datestamp <= '2025-12-07')) GROUP BY datestamp ORDER BY datestamp ASC NULLS LAST (4 rows) ERROR: pg_clickhouse: DB::Exception: Unknown function groupConcat. Maybe you meant: ['mapConcat','arrayConcat']: While processing SELECT datestamp, groupConcat(', ')(path) FROM agg_test.hits WHERE (datestamp >= '2025-12-05') AND (datestamp <= '2025-12-07') GROUP BY datestamp ORDER BY datestamp ASC NULLS LAST DETAIL: Remote Query: SELECT datestamp, groupConcat(', ')(path) FROM agg_test.hits WHERE ((datestamp >= '2025-12-05')) AND ((datestamp <= '2025-12-07')) GROUP BY datestamp ORDER BY datestamp ASC NULLS LAST -- bool_and pushdown (binary) QUERY PLAN --------------------------------------------------------------------------- Foreign Scan Output: (bool_and((duration > 0))) Relations: Aggregate on (hits) Remote SQL: SELECT groupBitAndOrNull((duration > 0)) FROM agg_test.hits (4 rows) bool_and ---------- t (1 row) -- bool_or pushdown (binary) QUERY PLAN ----------------------------------------------------------------------------- Foreign Scan Output: (bool_or((duration > 5000))) Relations: Aggregate on (hits) Remote SQL: SELECT groupBitOrOrNull((duration > 5000)) FROM agg_test.hits (4 rows) bool_or --------- t (1 row) -- every pushdown (binary) QUERY PLAN ----------------------------------------------------------------------- Foreign Scan Output: (every((cost > '0'::numeric))) Relations: Aggregate on (hits) Remote SQL: SELECT groupBitAndOrNull((cost > 0)) FROM agg_test.hits (4 rows) every ------- t (1 row) -- bool_and pushdown (http) QUERY PLAN --------------------------------------------------------------------------- Foreign Scan Output: (bool_and((duration > 0))) Relations: Aggregate on (hits) Remote SQL: SELECT groupBitAndOrNull((duration > 0)) FROM agg_test.hits (4 rows) bool_and ---------- t (1 row) -- bool_or pushdown (http) QUERY PLAN ----------------------------------------------------------------------------- Foreign Scan Output: (bool_or((duration > 5000))) Relations: Aggregate on (hits) Remote SQL: SELECT groupBitOrOrNull((duration > 5000)) FROM agg_test.hits (4 rows) bool_or --------- t (1 row) -- bit_and pushdown (binary) QUERY PLAN ------------------------------------------------------------------------------------------------------------------ Foreign Scan Output: (bit_and((duration)::integer)) Relations: Aggregate on (hits) Remote SQL: SELECT groupBitAnd(cast(duration, 'Nullable(Int32)')) FROM agg_test.hits WHERE ((id = 3498231651)) (4 rows) bit_and --------- 304 (1 row) -- bit_or pushdown (binary) QUERY PLAN ----------------------------------------------------------------------------------------------------------------- Foreign Scan Output: (bit_or((duration)::integer)) Relations: Aggregate on (hits) Remote SQL: SELECT groupBitOr(cast(duration, 'Nullable(Int32)')) FROM agg_test.hits WHERE ((id = 3498231651)) (4 rows) bit_or -------- 304 (1 row) -- bit_xor pushdown (binary) QUERY PLAN ------------------------------------------------------------------------------------------------------------------ Foreign Scan Output: (bit_xor((duration)::integer)) Relations: Aggregate on (hits) Remote SQL: SELECT groupBitXor(cast(duration, 'Nullable(Int32)')) FROM agg_test.hits WHERE ((id = 3498231651)) (4 rows) bit_xor --------- 304 (1 row) -- regr_slope pushdown QUERY PLAN -------------------------------------------------------------------- Aggregate Output: regr_slope((b)::double precision, (a)::double precision) -> Foreign Scan on agg_bin.agg_numbers Output: a, b Remote SQL: SELECT a, b FROM agg_test.agg_numbers (5 rows) regr_slope -------------------- 0.5127507004412711 (1 row) QUERY PLAN -------------------------------------------------------------------- Aggregate Output: regr_slope((b)::double precision, (a)::double precision) -> Foreign Scan on agg_http.agg_numbers Output: a, b Remote SQL: SELECT a, b FROM agg_test.agg_numbers (5 rows) regr_slope -------------------- 0.5127507004412711 (1 row) -- regr_avgy pushdown QUERY PLAN ------------------------------------------------------------------- Aggregate Output: regr_avgy((b)::double precision, (a)::double precision) -> Foreign Scan on agg_bin.agg_numbers Output: a, b Remote SQL: SELECT a, b FROM agg_test.agg_numbers (5 rows) regr_avgy -------------------- 107.94315227307379 (1 row) QUERY PLAN ------------------------------------------------------------------- Aggregate Output: regr_avgy((b)::double precision, (a)::double precision) -> Foreign Scan on agg_http.agg_numbers Output: a, b Remote SQL: SELECT a, b FROM agg_test.agg_numbers (5 rows) regr_avgy -------------------- 107.94315227307379 (1 row) -- regr_count pushdown QUERY PLAN -------------------------------------------------------------------- Aggregate Output: regr_count((b)::double precision, (a)::double precision) -> Foreign Scan on agg_bin.agg_numbers Output: a, b Remote SQL: SELECT a, b FROM agg_test.agg_numbers (5 rows) regr_count ------------ 4 (1 row) QUERY PLAN -------------------------------------------------------------------- Aggregate Output: regr_count((b)::double precision, (a)::double precision) -> Foreign Scan on agg_http.agg_numbers Output: a, b Remote SQL: SELECT a, b FROM agg_test.agg_numbers (5 rows) regr_count ------------ 4 (1 row) -- regr_intercept pushdown QUERY PLAN ------------------------------------------------------------------------ Aggregate Output: regr_intercept((b)::double precision, (a)::double precision) -> Foreign Scan on agg_bin.agg_numbers Output: a, b Remote SQL: SELECT a, b FROM agg_test.agg_numbers (5 rows) regr_intercept ------------------- 82.56199260123087 (1 row) QUERY PLAN ------------------------------------------------------------------------ Aggregate Output: regr_intercept((b)::double precision, (a)::double precision) -> Foreign Scan on agg_http.agg_numbers Output: a, b Remote SQL: SELECT a, b FROM agg_test.agg_numbers (5 rows) regr_intercept ------------------- 82.56199260123087 (1 row) -- regr_r2 pushdown QUERY PLAN ----------------------------------------------------------------- Aggregate Output: regr_r2((b)::double precision, (a)::double precision) -> Foreign Scan on agg_bin.agg_numbers Output: a, b Remote SQL: SELECT a, b FROM agg_test.agg_numbers (5 rows) regr_r2 --------------------- 0.01949779820318026 (1 row) QUERY PLAN ----------------------------------------------------------------- Aggregate Output: regr_r2((b)::double precision, (a)::double precision) -> Foreign Scan on agg_http.agg_numbers Output: a, b Remote SQL: SELECT a, b FROM agg_test.agg_numbers (5 rows) regr_r2 --------------------- 0.01949779820318026 (1 row) -- regr_sxx pushdown QUERY PLAN ------------------------------------------------------------------ Aggregate Output: regr_sxx((b)::double precision, (a)::double precision) -> Foreign Scan on agg_bin.agg_numbers Output: a, b Remote SQL: SELECT a, b FROM agg_test.agg_numbers (5 rows) regr_sxx ---------- 5099 (1 row) QUERY PLAN ------------------------------------------------------------------ Aggregate Output: regr_sxx((b)::double precision, (a)::double precision) -> Foreign Scan on agg_http.agg_numbers Output: a, b Remote SQL: SELECT a, b FROM agg_test.agg_numbers (5 rows) regr_sxx ---------- 5099 (1 row) -- regr_sxy pushdown QUERY PLAN ------------------------------------------------------------------ Aggregate Output: regr_sxy((b)::double precision, (a)::double precision) -> Foreign Scan on agg_bin.agg_numbers Output: a, b Remote SQL: SELECT a, b FROM agg_test.agg_numbers (5 rows) regr_sxy -------------------- 2614.5158215500414 (1 row) QUERY PLAN ------------------------------------------------------------------ Aggregate Output: regr_sxy((b)::double precision, (a)::double precision) -> Foreign Scan on agg_http.agg_numbers Output: a, b Remote SQL: SELECT a, b FROM agg_test.agg_numbers (5 rows) regr_sxy -------------------- 2614.5158215500414 (1 row) -- regr_syy pushdown QUERY PLAN ------------------------------------------------------------------ Aggregate Output: regr_syy((b)::double precision, (a)::double precision) -> Foreign Scan on agg_bin.agg_numbers Output: a, b Remote SQL: SELECT a, b FROM agg_test.agg_numbers (5 rows) regr_syy ------------------ 68756.2156939293 (1 row) QUERY PLAN ------------------------------------------------------------------ Aggregate Output: regr_syy((b)::double precision, (a)::double precision) -> Foreign Scan on agg_http.agg_numbers Output: a, b Remote SQL: SELECT a, b FROM agg_test.agg_numbers (5 rows) regr_syy ------------------ 68756.2156939293 (1 row) -- round() pushes down on 26.9+ QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------- Aggregate Output: round(regr_syy((b)::double precision, (a)::double precision)), regr_syy((b)::double precision, (a)::double precision) -> Foreign Scan on agg_bin.agg_numbers Output: a, b Remote SQL: SELECT a, b FROM agg_test.agg_numbers (5 rows) round | regr_syy -------+------------------ 68756 | 68756.2156939293 (1 row) QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------- Aggregate Output: round((regr_syy((b)::double precision, (a)::double precision))::numeric, 4), (regr_syy((b)::double precision, (a)::double precision))::numeric -> Foreign Scan on agg_bin.agg_numbers Output: a, b Remote SQL: SELECT a, b FROM agg_test.agg_numbers (5 rows) round | regr_syy ------------+------------------ 68756.2157 | 68756.2156939293 (1 row) -- corr(int, float) corr(float, int) QUERY PLAN ---------------------------------------------------------------------------------------------------------------------- Foreign Scan Output: (corr((a)::double precision, (b)::double precision)), (corr((b)::double precision, (a)::double precision)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT corrOrNull(a, b), corrOrNull(b, a) FROM agg_test.agg_numbers (4 rows) corr | corr --------------------+-------------------- 0.1396345165178734 | 0.1396345165178734 (1 row) QUERY PLAN ---------------------------------------------------------------------------------------------------------------------- Foreign Scan Output: (corr((a)::double precision, (b)::double precision)), (corr((b)::double precision, (a)::double precision)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT corrOrNull(a, b), corrOrNull(b, a) FROM agg_test.agg_numbers (4 rows) corr | corr --------------------+-------------------- 0.1396345165178734 | 0.1396345165178734 (1 row) -- covar_pop(int, float) covar_pop(float, int) covar_samp(int, float) covar_samp(float, int) QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------- Foreign Scan Output: (covar_pop((b)::double precision, (a)::double precision)), (covar_samp((b)::double precision, (a)::double precision)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT covar_popOrNull(b, a), covar_sampOrNull(b, a) FROM agg_test.agg_numbers (4 rows) covar_pop | covar_samp -------------------+------------------- 653.6289553875104 | 871.5052738500139 (1 row) QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------- Foreign Scan Output: (covar_pop((b)::double precision, (a)::double precision)), (covar_samp((b)::double precision, (a)::double precision)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT covar_popOrNull(b, a), covar_sampOrNull(b, a) FROM agg_test.agg_numbers (4 rows) covar_pop | covar_samp -------------------+------------------- 653.6289553875104 | 871.5052738500139 (1 row) -- stddev(int2), stddev_samp(int2), stddev_pop(int2) QUERY PLAN ---------------------------------------------------------------------------------------------------------- Foreign Scan Output: (stddev(a)), (stddev_samp(a)), (stddev_pop(a)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT stddev_samp(a), stddev_sampOrNull(a), stddev_popOrNull(a) FROM agg_test.agg_numbers (4 rows) stddev | stddev_samp | stddev_pop ------------------+------------------+------------------ 41.2270137975899 | 41.2270137975899 | 35.7036412708844 (1 row) QUERY PLAN ---------------------------------------------------------------------------------------------------------- Foreign Scan Output: (stddev(a)), (stddev_samp(a)), (stddev_pop(a)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT stddev_samp(a), stddev_sampOrNull(a), stddev_popOrNull(a) FROM agg_test.agg_numbers (4 rows) stddev | stddev_samp | stddev_pop ------------------+------------------+------------------ 41.2270137975899 | 41.2270137975899 | 35.7036412708844 (1 row) -- stddev(int4), stddev_samp(int4), stddev_pop(int4) QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Foreign Scan Output: (stddev((a)::integer)), (stddev_samp((a)::integer)), (stddev_pop((a)::integer)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT stddev_samp(cast(a, 'Nullable(Int32)')), stddev_sampOrNull(cast(a, 'Nullable(Int32)')), stddev_popOrNull(cast(a, 'Nullable(Int32)')) FROM agg_test.agg_numbers (4 rows) stddev | stddev_samp | stddev_pop ------------------+------------------+------------------ 41.2270137975899 | 41.2270137975899 | 35.7036412708844 (1 row) QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Foreign Scan Output: (stddev((a)::integer)), (stddev_samp((a)::integer)), (stddev_pop((a)::integer)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT stddev_samp(cast(a, 'Nullable(Int32)')), stddev_sampOrNull(cast(a, 'Nullable(Int32)')), stddev_popOrNull(cast(a, 'Nullable(Int32)')) FROM agg_test.agg_numbers (4 rows) stddev | stddev_samp | stddev_pop ------------------+------------------+------------------ 41.2270137975899 | 41.2270137975899 | 35.7036412708844 (1 row) -- stddev(int8), stddev_samp(int8), stddev_pop(int8) QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Foreign Scan Output: (stddev((a)::bigint)), (stddev_samp((a)::bigint)), (stddev_pop((a)::bigint)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT stddev_samp(cast(a, 'Nullable(Int64)')), stddev_sampOrNull(cast(a, 'Nullable(Int64)')), stddev_popOrNull(cast(a, 'Nullable(Int64)')) FROM agg_test.agg_numbers (4 rows) stddev | stddev_samp | stddev_pop ------------------+------------------+------------------ 41.2270137975899 | 41.2270137975899 | 35.7036412708844 (1 row) QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Foreign Scan Output: (stddev((a)::bigint)), (stddev_samp((a)::bigint)), (stddev_pop((a)::bigint)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT stddev_samp(cast(a, 'Nullable(Int64)')), stddev_sampOrNull(cast(a, 'Nullable(Int64)')), stddev_popOrNull(cast(a, 'Nullable(Int64)')) FROM agg_test.agg_numbers (4 rows) stddev | stddev_samp | stddev_pop ------------------+------------------+------------------ 41.2270137975899 | 41.2270137975899 | 35.7036412708844 (1 row) -- stddev(float), stddev_samp(float), stddev_pop(float) QUERY PLAN ---------------------------------------------------------------------------------------------------------- Foreign Scan Output: (stddev(b)), (stddev_samp(b)), (stddev_pop(b)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT stddev_samp(b), stddev_sampOrNull(b), stddev_popOrNull(b) FROM agg_test.agg_numbers (4 rows) stddev | stddev_samp | stddev_pop --------------------+--------------------+-------------------- 151.38937377929688 | 151.38937377929688 | 131.10704040527344 (1 row) QUERY PLAN ---------------------------------------------------------------------------------------------------------- Foreign Scan Output: (stddev(b)), (stddev_samp(b)), (stddev_pop(b)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT stddev_samp(b), stddev_sampOrNull(b), stddev_popOrNull(b) FROM agg_test.agg_numbers (4 rows) stddev | stddev_samp | stddev_pop --------------------+--------------------+-------------------- 151.38937377929688 | 151.38937377929688 | 131.10704040527344 (1 row) -- stddev(float8), stddev_samp(float8), stddev_pop(float8) QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Foreign Scan Output: (stddev((b)::double precision)), (stddev_samp((b)::double precision)), (stddev_pop((b)::double precision)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT stddev_samp(cast(b, 'Nullable(Float64)')), stddev_sampOrNull(cast(b, 'Nullable(Float64)')), stddev_popOrNull(cast(b, 'Nullable(Float64)')) FROM agg_test.agg_numbers (4 rows) stddev | stddev_samp | stddev_pop --------------------+--------------------+-------------------- 151.38936080399804 | 151.38936080399804 | 131.10703231895047 (1 row) QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Foreign Scan Output: (stddev((b)::double precision)), (stddev_samp((b)::double precision)), (stddev_pop((b)::double precision)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT stddev_samp(cast(b, 'Nullable(Float64)')), stddev_sampOrNull(cast(b, 'Nullable(Float64)')), stddev_popOrNull(cast(b, 'Nullable(Float64)')) FROM agg_test.agg_numbers (4 rows) stddev | stddev_samp | stddev_pop --------------------+--------------------+-------------------- 151.38936080399804 | 151.38936080399804 | 131.10703231895047 (1 row) -- stddev(numeric), stddev_samp(numeric), stddev_pop(numeric) QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Foreign Scan Output: (stddev((b)::numeric)), (stddev_samp((b)::numeric)), (stddev_pop((b)::numeric)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT stddev_samp(cast(toFloat64(b), 'Nullable(Decimal(76, 38))')), stddev_sampOrNull(cast(toFloat64(b), 'Nullable(Decimal(76, 38))')), stddev_popOrNull(cast(toFloat64(b), 'Nullable(Decimal(76, 38))')) FROM agg_test.agg_numbers (4 rows) stddev | stddev_samp | stddev_pop ------------------+------------------+----------------- 151.389360803998 | 151.389360803998 | 131.10703231895 (1 row) QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Foreign Scan Output: (stddev((b)::numeric)), (stddev_samp((b)::numeric)), (stddev_pop((b)::numeric)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT stddev_samp(cast(toFloat64(b), 'Nullable(Decimal(76, 38))')), stddev_sampOrNull(cast(toFloat64(b), 'Nullable(Decimal(76, 38))')), stddev_popOrNull(cast(toFloat64(b), 'Nullable(Decimal(76, 38))')) FROM agg_test.agg_numbers (4 rows) stddev | stddev_samp | stddev_pop ------------------+------------------+----------------- 151.389360803998 | 151.389360803998 | 131.10703231895 (1 row) -- var_pop(int2), var_samp(int2), variance(int2) QUERY PLAN ------------------------------------------------------------------------------------------------- Foreign Scan Output: (var_pop(a)), (var_samp(a)), (variance(a)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT var_popOrNull(a), var_sampOrNull(a), var_samp(a) FROM agg_test.agg_numbers (4 rows) var_pop | var_samp | variance ---------+------------------+------------------ 1274.75 | 1699.66666666667 | 1699.66666666667 (1 row) QUERY PLAN ------------------------------------------------------------------------------------------------- Foreign Scan Output: (var_pop(a)), (var_samp(a)), (variance(a)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT var_popOrNull(a), var_sampOrNull(a), var_samp(a) FROM agg_test.agg_numbers (4 rows) var_pop | var_samp | variance ---------+------------------+------------------ 1274.75 | 1699.66666666667 | 1699.66666666667 (1 row) -- var_pop(int4), var_samp(int4), variance(int4) QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Foreign Scan Output: (var_pop((a)::integer)), (var_samp((a)::integer)), (variance((a)::integer)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT var_popOrNull(cast(a, 'Nullable(Int32)')), var_sampOrNull(cast(a, 'Nullable(Int32)')), var_samp(cast(a, 'Nullable(Int32)')) FROM agg_test.agg_numbers (4 rows) var_pop | var_samp | variance ---------+------------------+------------------ 1274.75 | 1699.66666666667 | 1699.66666666667 (1 row) QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Foreign Scan Output: (var_pop((a)::integer)), (var_samp((a)::integer)), (variance((a)::integer)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT var_popOrNull(cast(a, 'Nullable(Int32)')), var_sampOrNull(cast(a, 'Nullable(Int32)')), var_samp(cast(a, 'Nullable(Int32)')) FROM agg_test.agg_numbers (4 rows) var_pop | var_samp | variance ---------+------------------+------------------ 1274.75 | 1699.66666666667 | 1699.66666666667 (1 row) -- var_pop(int8), var_samp(int8), variance(int8) QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Foreign Scan Output: (var_pop((a)::bigint)), (var_samp((a)::bigint)), (variance((a)::bigint)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT var_popOrNull(cast(a, 'Nullable(Int64)')), var_sampOrNull(cast(a, 'Nullable(Int64)')), var_samp(cast(a, 'Nullable(Int64)')) FROM agg_test.agg_numbers (4 rows) var_pop | var_samp | variance ---------+------------------+------------------ 1274.75 | 1699.66666666667 | 1699.66666666667 (1 row) QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Foreign Scan Output: (var_pop((a)::bigint)), (var_samp((a)::bigint)), (variance((a)::bigint)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT var_popOrNull(cast(a, 'Nullable(Int64)')), var_sampOrNull(cast(a, 'Nullable(Int64)')), var_samp(cast(a, 'Nullable(Int64)')) FROM agg_test.agg_numbers (4 rows) var_pop | var_samp | variance ---------+------------------+------------------ 1274.75 | 1699.66666666667 | 1699.66666666667 (1 row) -- var_pop(float), var_samp(float), variance(float) QUERY PLAN ------------------------------------------------------------------------------------------------- Foreign Scan Output: (var_pop(b)), (var_samp(b)), (variance(b)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT var_popOrNull(b), var_sampOrNull(b), var_samp(b) FROM agg_test.agg_numbers (4 rows) var_pop | var_samp | variance -----------------+---------------+--------------- 17189.056640625 | 22918.7421875 | 22918.7421875 (1 row) QUERY PLAN ------------------------------------------------------------------------------------------------- Foreign Scan Output: (var_pop(b)), (var_samp(b)), (variance(b)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT var_popOrNull(b), var_sampOrNull(b), var_samp(b) FROM agg_test.agg_numbers (4 rows) var_pop | var_samp | variance -----------------+---------------+--------------- 17189.056640625 | 22918.7421875 | 22918.7421875 (1 row) -- var_pop(float8), var_samp(float8), variance(float8) QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Foreign Scan Output: (var_pop((b)::double precision)), (var_samp((b)::double precision)), (variance((b)::double precision)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT var_popOrNull(cast(b, 'Nullable(Float64)')), var_sampOrNull(cast(b, 'Nullable(Float64)')), var_samp(cast(b, 'Nullable(Float64)')) FROM agg_test.agg_numbers (4 rows) var_pop | var_samp | variance --------------------+--------------------+-------------------- 17189.053923482326 | 22918.738564643103 | 22918.738564643103 (1 row) QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Foreign Scan Output: (var_pop((b)::double precision)), (var_samp((b)::double precision)), (variance((b)::double precision)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT var_popOrNull(cast(b, 'Nullable(Float64)')), var_sampOrNull(cast(b, 'Nullable(Float64)')), var_samp(cast(b, 'Nullable(Float64)')) FROM agg_test.agg_numbers (4 rows) var_pop | var_samp | variance --------------------+--------------------+-------------------- 17189.053923482326 | 22918.738564643103 | 22918.738564643103 (1 row) -- var_pop(numeric), var_samp(numeric), variance(numeric) QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Foreign Scan Output: (var_pop((b)::numeric)), (var_samp((b)::numeric)), (variance((b)::numeric)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT var_popOrNull(cast(toFloat64(b), 'Nullable(Decimal(76, 38))')), var_sampOrNull(cast(toFloat64(b), 'Nullable(Decimal(76, 38))')), var_samp(cast(toFloat64(b), 'Nullable(Decimal(76, 38))')) FROM agg_test.agg_numbers (4 rows) var_pop | var_samp | variance ------------------+------------------+------------------ 17189.0539234823 | 22918.7385646431 | 22918.7385646431 (1 row) QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Foreign Scan Output: (var_pop((b)::numeric)), (var_samp((b)::numeric)), (variance((b)::numeric)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT var_popOrNull(cast(toFloat64(b), 'Nullable(Decimal(76, 38))')), var_sampOrNull(cast(toFloat64(b), 'Nullable(Decimal(76, 38))')), var_samp(cast(toFloat64(b), 'Nullable(Decimal(76, 38))')) FROM agg_test.agg_numbers (4 rows) var_pop | var_samp | variance ------------------+------------------+------------------ 17189.0539234823 | 22918.7385646431 | 22918.7385646431 (1 row) -- any_value pushdown (binary) QUERY PLAN ----------------------------------------------------------------------------------------------- Foreign Scan Output: a, (any_value(a)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT a, any(a) FROM agg_test.agg_numbers GROUP BY a ORDER BY a ASC NULLS LAST (4 rows) a | any_value -----+----------- 0 | 0 42 | 42 56 | 56 100 | 100 (4 rows) -- any_value pushdown (http) QUERY PLAN ----------------------------------------------------------------------------------------------- Foreign Scan Output: a, (any_value(a)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT a, any(a) FROM agg_test.agg_numbers GROUP BY a ORDER BY a ASC NULLS LAST (4 rows) a | any_value -----+----------- 0 | 0 42 | 42 56 | 56 100 | 100 (4 rows) -- empty input (binary) QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Foreign Scan Output: (sum(b)), (avg(b)), (min(a)), (max(a)), (bool_and((a > 0))), (stddev_samp(b)), (count(*)), (array_agg(a)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT sumOrNull(b), avgOrNull(b), minOrNull(a), maxOrNull(a), groupBitAndOrNull((a > 0)), stddev_sampOrNull(b), count(*), groupArray(a) FROM agg_test.agg_numbers WHERE ((a < 0)) (4 rows) sum | avg | min | max | bool_and | stddev_samp | count | array_agg -----+-----+-----+-----+----------+-------------+-------+----------- | | | | | | 0 | {} (1 row) QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Foreign Scan Output: ((a > 50)), (sum(b) FILTER (WHERE (a < 0))), (avg(b) FILTER (WHERE (a < 0))), (count(*) FILTER (WHERE (a < 0))), (max(b)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT (a > 50), sumIfOrNull(b,(((a < 0)) > 0)), avgIfOrNull(b,(((a < 0)) > 0)), countIf((((a < 0)) > 0)), max(b) FROM agg_test.agg_numbers GROUP BY ((a > 50)) ORDER BY (a > 50) ASC NULLS LAST (4 rows) big | sum | avg | count | max -----+-----+-----+-------+-------- f | | | 0 | 324.78 t | | | 0 | 99.097 (2 rows) QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------ Aggregate Output: regr_slope((b)::double precision, (a)::double precision), regr_count((b)::double precision, (a)::double precision) -> Foreign Scan on agg_bin.agg_numbers Output: a, b Remote SQL: SELECT a, b FROM agg_test.agg_numbers WHERE ((a < 0)) (5 rows) regr_slope | regr_count ------------+------------ | 0 (1 row) -- empty input (http) QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Foreign Scan Output: (sum(b)), (avg(b)), (min(a)), (max(a)), (bool_and((a > 0))), (stddev_samp(b)), (count(*)), (array_agg(a)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT sumOrNull(b), avgOrNull(b), minOrNull(a), maxOrNull(a), groupBitAndOrNull((a > 0)), stddev_sampOrNull(b), count(*), groupArray(a) FROM agg_test.agg_numbers WHERE ((a < 0)) (4 rows) sum | avg | min | max | bool_and | stddev_samp | count | array_agg -----+-----+-----+-----+----------+-------------+-------+----------- | | | | | | 0 | {} (1 row) QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Foreign Scan Output: ((a > 50)), (sum(b) FILTER (WHERE (a < 0))), (avg(b) FILTER (WHERE (a < 0))), (count(*) FILTER (WHERE (a < 0))), (max(b)) Relations: Aggregate on (agg_numbers) Remote SQL: SELECT (a > 50), sumIfOrNull(b,(((a < 0)) > 0)), avgIfOrNull(b,(((a < 0)) > 0)), countIf((((a < 0)) > 0)), max(b) FROM agg_test.agg_numbers GROUP BY ((a > 50)) ORDER BY (a > 50) ASC NULLS LAST (4 rows) big | sum | avg | count | max -----+-----+-----+-------+-------- f | | | 0 | 324.78 t | | | 0 | 99.097 (2 rows) QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------ Aggregate Output: regr_slope((b)::double precision, (a)::double precision), regr_count((b)::double precision, (a)::double precision) -> Foreign Scan on agg_http.agg_numbers Output: a, b Remote SQL: SELECT a, b FROM agg_test.agg_numbers WHERE ((a < 0)) (5 rows) regr_slope | regr_count ------------+------------ | 0 (1 row) NOTICE: drop cascades to 2 other objects DETAIL: drop cascades to foreign table agg_bin.agg_numbers drop cascades to foreign table agg_bin.hits NOTICE: drop cascades to 2 other objects DETAIL: drop cascades to foreign table agg_http.agg_numbers drop cascades to foreign table agg_http.hits