From a133f47574f28920f93eafbf652d2475b3cb311e Mon Sep 17 00:00:00 2001 From: Jessica Date: Thu, 29 Dec 2022 19:31:30 -0500 Subject: [PATCH] Add warning for query passthrough --- docs/src/main/sphinx/connector/bigquery.rst | 2 ++ docs/src/main/sphinx/connector/druid.rst | 2 ++ docs/src/main/sphinx/connector/elasticsearch.rst | 2 ++ docs/src/main/sphinx/connector/mariadb.rst | 2 ++ docs/src/main/sphinx/connector/mysql.rst | 2 ++ docs/src/main/sphinx/connector/oracle.rst | 2 ++ docs/src/main/sphinx/connector/postgresql.rst | 2 ++ .../main/sphinx/connector/query-passthrough-warning.fragment | 4 ++++ docs/src/main/sphinx/connector/redshift.rst | 2 ++ docs/src/main/sphinx/connector/sqlserver.rst | 2 ++ 10 files changed, 22 insertions(+) create mode 100644 docs/src/main/sphinx/connector/query-passthrough-warning.fragment diff --git a/docs/src/main/sphinx/connector/bigquery.rst b/docs/src/main/sphinx/connector/bigquery.rst index bd71b0454bc7..b5b41f182e98 100644 --- a/docs/src/main/sphinx/connector/bigquery.rst +++ b/docs/src/main/sphinx/connector/bigquery.rst @@ -342,6 +342,8 @@ processed by BigQuery. This can be useful for accessing native features which ar not available in Trino or for improving query performance in situations where running a query natively may be faster. +.. include:: query-passthrough-warning.fragment + .. include:: polymorphic-table-function-ordering.fragment For example, group and concatenate all employee IDs by manager ID:: diff --git a/docs/src/main/sphinx/connector/druid.rst b/docs/src/main/sphinx/connector/druid.rst index 698e58491d67..0e0648821b09 100644 --- a/docs/src/main/sphinx/connector/druid.rst +++ b/docs/src/main/sphinx/connector/druid.rst @@ -134,6 +134,8 @@ processed in Druid. This can be useful for accessing native features which are not available in Trino or for improving query performance in situations where running a query natively may be faster. +.. include:: query-passthrough-warning.fragment + .. include:: polymorphic-table-function-ordering.fragment As an example, use ``STRING_TO_MV`` and ``MV_LENGTH`` from diff --git a/docs/src/main/sphinx/connector/elasticsearch.rst b/docs/src/main/sphinx/connector/elasticsearch.rst index 29494bd5f4ae..e9539ed6d306 100644 --- a/docs/src/main/sphinx/connector/elasticsearch.rst +++ b/docs/src/main/sphinx/connector/elasticsearch.rst @@ -444,6 +444,8 @@ This can be useful for accessing native features which are not available in Trino or for improving query performance in situations where running a query natively may be faster. +.. include:: query-passthrough-warning.fragment + .. include:: polymorphic-table-function-ordering.fragment The ``raw_query`` function requires three parameters: diff --git a/docs/src/main/sphinx/connector/mariadb.rst b/docs/src/main/sphinx/connector/mariadb.rst index d24d19ba2818..ec2fc204c8ed 100644 --- a/docs/src/main/sphinx/connector/mariadb.rst +++ b/docs/src/main/sphinx/connector/mariadb.rst @@ -289,6 +289,8 @@ processed in MariaDB. This can be useful for accessing native features which are not available in Trino or for improving query performance in situations where running a query natively may be faster. +.. include:: query-passthrough-warning.fragment + .. include:: polymorphic-table-function-ordering.fragment As an example, select the age of employees by using ``TIMESTAMPDIFF`` and diff --git a/docs/src/main/sphinx/connector/mysql.rst b/docs/src/main/sphinx/connector/mysql.rst index f1451563e9fe..8923f50a44a2 100644 --- a/docs/src/main/sphinx/connector/mysql.rst +++ b/docs/src/main/sphinx/connector/mysql.rst @@ -324,6 +324,8 @@ processed in MySQL. This can be useful for accessing native features which are not available in Trino or for improving query performance in situations where running a query natively may be faster. +.. include:: query-passthrough-warning.fragment + .. include:: polymorphic-table-function-ordering.fragment For example, group and concatenate all employee IDs by manager ID:: diff --git a/docs/src/main/sphinx/connector/oracle.rst b/docs/src/main/sphinx/connector/oracle.rst index a1a967853745..13027108b9e3 100644 --- a/docs/src/main/sphinx/connector/oracle.rst +++ b/docs/src/main/sphinx/connector/oracle.rst @@ -428,6 +428,8 @@ processed in Oracle. This can be useful for accessing native features which are not available in Trino or for improving query performance in situations where running a query natively may be faster. +.. include:: query-passthrough-warning.fragment + .. include:: polymorphic-table-function-ordering.fragment As a simple example, to select an entire table:: diff --git a/docs/src/main/sphinx/connector/postgresql.rst b/docs/src/main/sphinx/connector/postgresql.rst index b65a35905ae1..47e3c19c15cf 100644 --- a/docs/src/main/sphinx/connector/postgresql.rst +++ b/docs/src/main/sphinx/connector/postgresql.rst @@ -344,6 +344,8 @@ processed in PostgreSQL. This can be useful for accessing native features which are not available in Trino or for improving query performance in situations where running a query natively may be faster. +.. include:: query-passthrough-warning.fragment + .. include:: polymorphic-table-function-ordering.fragment As a simple example, to select an entire table:: diff --git a/docs/src/main/sphinx/connector/query-passthrough-warning.fragment b/docs/src/main/sphinx/connector/query-passthrough-warning.fragment new file mode 100644 index 000000000000..7373b10c11cc --- /dev/null +++ b/docs/src/main/sphinx/connector/query-passthrough-warning.fragment @@ -0,0 +1,4 @@ +The native query passed to the underlying data source is required to return a +table as a result set. Only the data source performs validation or security +checks for these queries using its own configuration. Trino does not perform +these tasks. Only use passthrough queries to read data. diff --git a/docs/src/main/sphinx/connector/redshift.rst b/docs/src/main/sphinx/connector/redshift.rst index d8d6aff497d9..8afd357ac8e7 100644 --- a/docs/src/main/sphinx/connector/redshift.rst +++ b/docs/src/main/sphinx/connector/redshift.rst @@ -159,6 +159,8 @@ processed in Redshift. This can be useful for accessing native features which are not implemented in Trino or for improving query performance in situations where running a query natively may be faster. +.. include:: query-passthrough-warning.fragment + .. include:: polymorphic-table-function-ordering.fragment For example, select the top 10 nations by population:: diff --git a/docs/src/main/sphinx/connector/sqlserver.rst b/docs/src/main/sphinx/connector/sqlserver.rst index 3f8d517824d0..84043d45d1fd 100644 --- a/docs/src/main/sphinx/connector/sqlserver.rst +++ b/docs/src/main/sphinx/connector/sqlserver.rst @@ -347,6 +347,8 @@ processed in SQL Server. This can be useful for accessing native features which are not implemented in Trino or for improving query performance in situations where running a query natively may be faster. +.. include:: query-passthrough-warning.fragment + .. include:: polymorphic-table-function-ordering.fragment For example, select the top 10 percent of nations by population::