Skip to content

Commit

Permalink
Merge pull request #4488 from EnterpriseDB/release/2023-07-24
Browse files Browse the repository at this point in the history
Release: 2023-07-24
  • Loading branch information
drothery-edb authored Jul 24, 2023
2 parents c2530da + 8eff336 commit 087af5b
Show file tree
Hide file tree
Showing 20 changed files with 156 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ The Hadoop Foreign Data Wrapper is supported on the same Linux platforms as EDB

This table lists the latest Hadoop Foreign Data Wrapper versions and their supported corresponding EDB Postgres Advanced Server (EPAS) versions.

| Hadoop Foreign Data Wrapper | EPAS 15 | EPAS 14 | EPAS 13 | EPAS 12 | EPAS 11 |
| --------------------------- | ------- | ------- | ------- | ------- | ------- |
| 2.3.0 | Y | Y | Y | Y | Y |
| 2.2.0 | Y | Y | Y | Y | Y |
| 2.1.0 | N | Y | Y | Y | Y |
| 2.0.9 | N | Y | Y | Y | Y |
| 2.0.8 | N | N | Y | Y | Y |
| 2.0.7 | N | N | Y | Y | Y |
| 2.0.6 | N | N | Y | Y | Y |
| Hadoop Foreign Data Wrapper | EPAS 16 | EPAS 15 | EPAS 14 | EPAS 13 | EPAS 12 | EPAS 11 |
| --------------------------- | ------- | ------- | ------- | ------- | ------- | ------- |
| 2.3.1 | Y | Y | Y | Y | Y | Y |
| 2.3.0 | N | Y | Y | Y | Y | Y |
| 2.2.0 | N | Y | Y | Y | Y | Y |
| 2.1.0 | N | N | Y | Y | Y | Y |
| 2.0.9 | N | N | Y | Y | Y | Y |
| 2.0.8 | N | N | N | Y | Y | Y |
| 2.0.7 | N | N | N | Y | Y | Y |
| 2.0.6 | N | N | N | Y | Y | Y |
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ __OUTPUT__
(4 rows)
```

Enable/disable GUC for join pushdown queries at table level:
Enable/disable GUC for join pushdown queries at the table level:

```sql
-- enable join pushdown at the table level
Expand Down Expand Up @@ -209,3 +209,6 @@ __OUTPUT__
Remote SQL: SELECT `deptno`, `dname` FROM `fdw_db`.`dept`
(14 rows)
```

!!! Note
You can also enable/disable join pushdown at the server level using a GUC. For more information, see [CREATE SERVER](configuring/#create-server).
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Example: Aggregate pushdown "
---

This example shows aggregate pushdown between the foreign tables of the same remote HIVE/SPARK server to that remote HIVE/SPARK server:
This example shows aggregate pushdown between the foreign tables of the same remote HIVE/SPARK server to that remote HIVE/SPARK server.

Tables on HIVE/SPARK server:

Expand Down Expand Up @@ -65,9 +65,10 @@ CREATE FOREIGN TABLE emp (
SERVER hdfs_server OPTIONS (dbname 'fdw_db', table_name 'emp');
```

Query with aggregate pushdown:
Enable/disable GUC for AGGREGATE pushdown queries at the session level:

```sql
SET hdfs_fdw.enable_aggregate_pushdown to true;
-- aggregate functions
EXPLAIN (VERBOSE, COSTS OFF)
SELECT deptno, COUNT(*),SUM(sal),MAX(sal),MIN(sal),AVG(sal) FROM emp
Expand All @@ -86,3 +87,6 @@ QUERY PLAN
Remote SQL: SELECT `deptno`, count(*), sum(`sal`), max(`sal`), min(`sal`), avg(`sal`) FROM `k_test`.`emp` WHERE (`deptno` IN (10,20)) GROUP BY `deptno`
(7 rows)
```

!!! Note
You can also enable/disable aggregate pushdown at the server/table level using a GUC. For more information, see [CREATE SERVER](onfiguring/#create-server) and [CREATE FOREIGN TABLE](configuring/#create-foreign-table).
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Example: ORDER BY pushdown "
---

This example shows ORDER BY pushdown between the foreign tables of the same remote HIVE/SPARK server as the remote HIVE/SPARK server:
This example shows ORDER BY pushdown between the foreign tables of the same remote HIVE/SPARK server as the remote HIVE/SPARK server.

Tables on HIVE/SPARK server:

Expand Down Expand Up @@ -58,7 +58,7 @@ CREATE FOREIGN TABLE emp (
SERVER hdfs_server OPTIONS (dbname 'fdw_db', table_name 'emp');
```

Query with ORDER BY pushdown:
Enable/disable GUC for ORDER BY pushdown queries at the session level:

```sql
edb=# SET hdfs_fdw.enable_order_by_pushdown TO ON;
Expand All @@ -81,3 +81,6 @@ __OUTPUT__
-> Foreign Scan on emp
(3 rows)
```

!!! Note
You can also enable/disable ORDER BY pushdown at the server/table level using a GUC. For more information, see [create server](/hadoop_data_adapter/latest/configuring/#create-server) and [create foreign table](/hadoop_data_adapter/latest/configuring/#create-foreign-table).
6 changes: 5 additions & 1 deletion product_docs/docs/hadoop_data_adapter/2/configuring.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ The role that defines the server is the owner of the server. Use the `ALTER SERV
| client_type | Specify `hiveserver2` or `spark` as the client type. To use the `ANALYZE` statement on Spark, you must specify a value of `spark`. The default value is `hiveserver2`. |
| auth_type<br /> | The authentication type of the client. Specify `LDAP` or `NOSASL`. If you don't specify an `auth_type`, the data wrapper decides the `auth_type` value on the basis of the user mapping. If the user mapping includes a user name and password, the data wrapper uses LDAP authentication. If the user mapping doesn't include a user name and password, the data wrapper uses NOSASL authentication. |
| connect_timeout | The length of time before a connection attempt times out. The default value is 300 seconds |
| enable_aggregate_pushdown | Similar to the table-level option but configured at the server level. If `true`, pushes the aggregate operations to the foreign server instead of fetching rows from the foreign server and performing the operations locally. You can also set this option for an individual table. The table-level value of the option takes precedence over the server-level option value. Default is `true`. |
| enable_join_pushdown | Similar to the table-level option but configured at the server level. If `true`, pushes the join between two foreign tables from the same foreign server instead of fetching all the rows for both the tables and performing a join locally. You can also set this option for an individual table and, if any of the tables involved in the join has set the option to `false`, then the join isn't pushed down. The table-level value of the option takes precedence over the server-level option value. Default is `true`. |
| enable_order_by_pushdown | Similar to the table-level option but configured at the server level. If `true`, pushes the order-by operation to the foreign server instead of fetching rows from the foreign server and performing the sort locally. You can also set this option for an individual table. The table-level value of the option takes precedence over the server-level option value. Default is `true`. |
| fetch_size | Provided as a parameter to the JDBC API `setFetchSize`. The default value is `10,000`. |
| log_remote_sql | If `true`, logging includes SQL commands executed on the remote Hive server and the number of times that a scan is repeated. The default is `false`. |
| query_timeout | Use `query_timeout` to provide the number of seconds after which a request times out if it isn't satisfied by the Hive server. Query timeout is not supported by the Hive JDBC driver. |
Expand Down Expand Up @@ -253,7 +255,9 @@ CREATE FOREIGN TABLE [ IF NOT EXISTS ] table_name ( [
| ---------- | --------------------------------------------------------------------------------------- |
| dbname | The name of the database on the Hive server. The database name is required. |
| table_name | The name of the table on the Hive server. The default is the name of the foreign table. |
| enable_join_pushdown | Similar to the server-level option but configured at table level. If `true`, pushes the join between two foreign tables from the same foreign server instead of fetching all the rows for both the tables and performing a join locally. You can also set this option for an individual table. If any of the tables involved in the join has set the option to `false`, then the join isn't pushed down. The table-level value of the option takes precedence over the server-level option value. Default is `true`. |
| enable_aggregate_pushdown | Similar to the server-level option but configured at the table level. If `true`, pushes the aggregate operations to the foreign server instead of fetching rows from the foreign server and performing the operations locally. You can also set this option for an individual table. The table-level value of the option takes precedence over the server-level option value. Default is `true`. |
| enable_join_pushdown | Similar to the server-level option but configured at the table level. If `true`, pushes the join between two foreign tables from the same foreign server instead of fetching all the rows for both the tables and performing a join locally. You can also set this option for an individual table. If any of the tables involved in the join has set the option to `false`, then the join isn't pushed down. The table-level value of the option takes precedence over the server-level option value. Default is `true`. |
| enable_order_by_pushdown | Similar to the server-level option but configured at the table level. If `true`, pushes the order-by operation to the foreign server instead of fetching rows from the foreign server and performing the sort locally. You can also set this option for an individual table. The table-level value of the option takes precedence over the server-level option value. Default is `true`. |

### Example

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: "Version 2.3.1"
---

Enhancements, bug fixes, and other changes in Hadoop Foreign Data Wrapper 2.3.1 include:

| Type | Description |
| ----------- |--------------------------------------------------------------------------------------------------------------------------------- |
| Enhancement | Added support for PostgreSQL 16. |
| Feature | Added `enable_join_pushdown` and `enable_aggregate_pushdown` GUCs to support JOIN and AGGREGATE pushdowns, respectively. |
| Feature | Added table and server level option to `enable_order_by_pushdown` and `enable_aggregate_pushdown` GUCs. |



Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Release Notes"
redirects:
- ../01_whats_new/
navigation:
- hadoop_rel_notes_2.3.1
- hadoop_rel_notes_2.3.0
- hadoop_rel_notes_2.2.0
- hadoop_rel_notes_2.1.0
Expand All @@ -17,6 +18,7 @@ The Hadoop Foreign Data Wrapper documentation describes the latest version inclu

| Version | Release Date |
| --------------------------------| ------------ |
| [2.3.1](hadoop_rel_notes_2.3.1) | 2023 Jul 20 |
| [2.3.0](hadoop_rel_notes_2.3.0) | 2023 Jan 06 |
| [2.2.0](hadoop_rel_notes_2.2.0) | 2022 May 26 |
| [2.1.0](hadoop_rel_notes_2.1.0) | 2021 Dec 02 |
Expand Down
4 changes: 2 additions & 2 deletions product_docs/docs/hadoop_data_adapter/2/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ navigation:
- 09_using_the_hadoop_data_adapter
- 10a_example_join_pushdown
- 10b_example_aggregate_pushdown
- 10c_example_order_by_push_down
- 10d_example_limit_offset_push_down
- 10c_example_order_by_pushdown
- 10d_example_limit_offset_pushdown
- "#Troubleshooting"
- 10_identifying_data_adapter_version

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ MongoDB Foreign Data Wrapper is supported on the same platforms as EDB Postgres

This table lists the latest MongoDB Foreign Data Wrapper versions and their supported corresponding EDB Postgres Advanced Server (EPAS) versions.

| MongoDB Foreign Data Wrapper | EPAS 15 | EPAS 14 | EPAS 13 | EPAS 12 | EPAS 11 |
| ---------------------------- | ------- | ------- | ------- | ------- | ------- |
| 5.5.0 | Y | Y | Y | Y | Y |
| 5.4.0 | Y | Y | Y | Y | Y |
| 5.3.0 | N | Y | Y | Y | Y |
| 5.2.10 | N | N | Y | Y | Y |
| 5.2.9 | N | N | Y | Y | Y |
| 5.2.8 | N | N | Y | Y | Y |
| 5.2.7 | N | N | Y | Y | Y |
| MongoDB Foreign Data Wrapper | EPAS 16 | EPAS 15 | EPAS 14 | EPAS 13 | EPAS 12 | EPAS 11 |
| ---------------------------- | ------- | ------- | ------- | ------- | ------- | ------- |
| 5.5.1 | Y | Y | Y | Y | Y | Y |
| 5.5.0 | N | Y | Y | Y | Y | Y |
| 5.4.0 | N | Y | Y | Y | Y | Y |
| 5.3.0 | N | N | Y | Y | Y | Y |
| 5.2.10 | N | N | N | Y | Y | Y |
| 5.2.9 | N | N | N | Y | Y | Y |
| 5.2.8 | N | N | N | Y | Y | Y |
| 5.2.7 | N | N | N | Y | Y | Y |

Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,22 @@ INSERT INTO dept VALUES (0, 10, 'SALES');
INSERT INTO dept VALUES (0, 20, 'ENGG');
INSERT INTO dept VALUES (0, 30, 'IT');
```
Enable/disable GUC for JOIN pushdown queries at the session level, table level, or server level:

```sql
-- Session level
edb=# SET mongo_fdw.enable_join_pushdown to true;
SET
-- Table level
edb=# ALTER FOREIGN TABLE emp OPTIONS (ADD enable_join_pushdown 'true');
Table altered
-- Server level
edb=# ALTER SERVER mongo_server OPTIONS (ADD enable_join_pushdown 'true');
altered
```

Query with JOIN pushdown:

The output:
```sql
--inner join
edb=# EXPLAIN VERBOSE SELECT e.ename, d.dname FROM emp e INNER JOIN dept d ON (e.deptid = d.deptid);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,21 @@ INSERT INTO emp VALUES (0, 120, 20);
INSERT INTO emp VALUES (0, 130, 30);
```

The output:
Enable/disable GUC for aggregate pushdown queries at the session level, table level, or server level:

```sql
-- Session level
edb=# SET mongo_fdw.enable_aggregate_pushdown to true;
SET
-- Table level
edb=# ALTER FOREIGN TABLE emp OPTIONS (ADD enable_aggregate_pushdown 'true');
Table altered
-- Server level
edb=# ALTER SERVER mongo_server OPTIONS (ADD enable_aggregate_pushdown 'true');
altered
```

Query with aggregate pushdown:

```sql
-- COUNT function
Expand Down
Loading

2 comments on commit 087af5b

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸŽ‰ Published on https://edb-docs.netlify.app as production
πŸš€ Deployed on https://64bea2ab4c1b371575bcc6df--edb-docs.netlify.app

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.