From 3b72468bda00d91ee5b221b51ccc065c6dccc632 Mon Sep 17 00:00:00 2001 From: anastasiiasergienko Date: Wed, 30 Sep 2020 15:54:48 +0200 Subject: [PATCH] #391: Removed the API documentation from this repository and added a link to it. --- README.md | 6 +- doc/changes/changes_4.0.4.md | 3 +- doc/development/api/capabilities_list.md | 274 ---- doc/development/api/scalar_functions_api.md | 439 ------ doc/development/api/virtual_schema_api.md | 1210 ----------------- .../developing_a_dialect.md | 1 - .../integration_testing.md | 3 +- 7 files changed, 7 insertions(+), 1929 deletions(-) delete mode 100644 doc/development/api/capabilities_list.md delete mode 100644 doc/development/api/scalar_functions_api.md delete mode 100644 doc/development/api/virtual_schema_api.md diff --git a/README.md b/README.md index 59b08fe06..930b8e5b4 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ Additional resources: ## Information for Developers -* [Virtual Schema API Documentation](doc/development/api/virtual_schema_api.md) +* [Virtual Schema API Documentation][vs-api] * [Developing and Testing an SQL Dialect](doc/development/developing-sql-dialect/developing_a_dialect.md) * [Step-by-step guide to writing your own SQL dialect](doc/development/developing-sql-dialect/step_by_step_guide_to_writing_your_own_dialect.md) * [Remote Debugging](doc/development/remote_debugging.md) @@ -159,6 +159,7 @@ Running the Virtual Schema requires a Java Runtime version 9 or later. | [Versions Maven Plugin][versions-maven-plugin] | Checking if dependencies updates are available | Apache License 2.0 | | [Artifact Reference Checker Plugin][artifact-reference-checker-plugin] | Check if artifact is referenced with correct version | MIT License | +[artifact-reference-checker-plugin]: https://github.com/exasol/artifact-reference-checker-maven-plugin [maven-assembly-plugin]: https://maven.apache.org/plugins/maven-assembly-plugin/ [apache-trift]: http://thrift.apache.org/ [exasol-jdbc-driver]: https://www.exasol.com/portal/display/DOWNLOAD/Exasol+Download+Section @@ -189,4 +190,5 @@ Running the Virtual Schema requires a Java Runtime version 9 or later. [sql-server-dialect-doc]: doc/dialects/sql_server.md [sybase-dialect-doc]: doc/dialects/sybase.md [teradata-dialect-doc]: doc/dialects/teradata.md -[artifact-reference-checker-plugin]: https://github.com/exasol/artifact-reference-checker-maven-plugin \ No newline at end of file + +[vs-api]: https://github.com/exasol/virtual-schema-common-java/blob/master/doc/development/api/virtual_schema_api.md \ No newline at end of file diff --git a/doc/changes/changes_4.0.4.md b/doc/changes/changes_4.0.4.md index 3b8d2ff49..df8af192f 100644 --- a/doc/changes/changes_4.0.4.md +++ b/doc/changes/changes_4.0.4.md @@ -1,4 +1,4 @@ -# Exasol Virtual Schemas 4.0.4, released 2020-??-?? +# Exasol Virtual Schemas 4.0.4, released 2020-10-?? Code name: @@ -9,6 +9,7 @@ Code name: * #384: Turned embedded JSON into key-value encoding in Adapter Notes API examples. * #386: Remove the documentation that was moved to the portal, added links instead. * #394: Described 'No suitable driver found', added a note that Hive 1.1.0 has problems with its driver. +* #391: Removed the API documentation from this repository and added a link to it. ## Refactoring diff --git a/doc/development/api/capabilities_list.md b/doc/development/api/capabilities_list.md deleted file mode 100644 index 577fd39d5..000000000 --- a/doc/development/api/capabilities_list.md +++ /dev/null @@ -1,274 +0,0 @@ -# Capabilities List - -Here you can find a list of capabilities supported by the Adapter. - -## [Main Capabilities](https://github.com/exasol/virtual-schema-common-java/blob/master/src/main/java/com/exasol/adapter/capabilities/MainCapability.java) - -- AGGREGATE_GROUP_BY_COLUMN -- AGGREGATE_GROUP_BY_EXPRESSION -- AGGREGATE_GROUP_BY_TUPLE -- AGGREGATE_HAVING -- AGGREGATE_SINGLE_GROUP -- FILTER_EXPRESSIONS -- JOIN -- JOIN_CONDITION_ALL -- JOIN_CONDITION_EQUI -- JOIN_TYPE_INNER -- JOIN_TYPE_FULL_OUTER -- JOIN_TYPE_LEFT_OUTER -- JOIN_TYPE_RIGHT_OUTER -- LIMIT -- LIMIT_WITH_OFFSET -- ORDER_BY_COLUMN -- ORDER_BY_EXPRESSION -- SELECTLIST_EXPRESSIONS -- SELECTLIST_PROJECTION - -## [Literal Capabilities](https://github.com/exasol/virtual-schema-common-java/blob/master/src/main/java/com/exasol/adapter/capabilities/LiteralCapability.java) - -- LITERAL_BOOL -- LITERAL_DATE -- LITERAL_DOUBLE -- LITERAL_EXACTNUMERIC -- LITERAL_INTERVAL -- LITERAL_NULL -- LITERAL_STRING -- LITERAL_TIMESTAMP -- LITERAL_TIMESTAMP_UTC - -## [Predicate Capabilities](https://github.com/exasol/virtual-schema-common-java/blob/master/src/main/java/com/exasol/adapter/capabilities/PredicateCapability.java) - -- FN_PRED_AND -- FN_PRED_BETWEEN -- FN_PRED_EQUAL -- FN_PRED_IN_CONSTLIST -- FN_PRED_IS_JSON -- FN_PRED_IS_NOT_JSON -- FN_PRED_IS_NOT_NULL -- FN_PRED_IS_NULL -- FN_PRED_LESS -- FN_PRED_LESSEQUAL -- FN_PRED_LIKE -- FN_PRED_LIKE_ESCAPE -- FN_PRED_NOT -- FN_PRED_NOTEQUAL -- FN_PRED_REGEXP_LIKE -- FN_PRED_OR - - -## [Scalar Function Capabilities](https://github.com/exasol/virtual-schema-common-java/blob/master/src/main/java/com/exasol/adapter/capabilities/ScalarFunctionCapability.java) - -- FN_ABS -- FN_ACOS -- FN_ADD -- FN_ADD_DAYS -- FN_ADD_HOURS -- FN_ADD_MINUTES -- FN_ADD_MONTHS -- FN_ADD_SECONDS -- FN_ADD_WEEKS -- FN_ADD_YEARS -- FN_ASCII -- FN_ASIN -- FN_ATAN -- FN_ATAN2 -- FN_BIT_AND -- FN_BIT_CHECK -- FN_BIT_LENGTH -- FN_BIT_NOT -- FN_BIT_OR -- FN_BIT_SET -- FN_BIT_TO_NUM -- FN_BIT_XOR -- FN_CASE -- FN_CAST -- FN_CEIL -- FN_CHR -- FN_COLOGNE_PHONETIC -- FN_COS -- FN_COSH -- FN_CONCAT -- FN_CONVERT_TZ -- FN_COT -- FN_CURRENT_DATE -- FN_CURRENT_SCHEMA -- FN_CURRENT_SESSION -- FN_CURRENT_STATEMENT -- FN_CURRENT_TIMESTAMP -- FN_CURRENT_USER -- FN_DATE_TRUNC -- FN_DAY -- FN_DAYS_BETWEEN -- FN_DBTIMEZONE -- FN_DEGREES -- FN_DIV -- FN_DUMP -- FN_EDIT_DISTANCE -- FN_EXP -- FN_EXTRACT -- FN_FLOAT_DIV -- FN_FLOOR -- FN_GREATEST -- FN_HASH_MD5 -- FN_HASH_SHA -- FN_HASH_SHA1 -- FN_HASH_SHA256 -- FN_HASH_SHA512 -- FN_HASH_TIGER -- FN_HASHTYPE_MD5 -- FN_HASHTYPE_SHA1 -- FN_HASHTYPE_SHA256 -- FN_HASHTYPE_SHA512 -- FN_HASHTYPE_TIGER -- FN_HOURS_BETWEEN -- FN_INSERT -- FN_INSTR -- FN_IS_BOOLEAN -- FN_IS_DATE -- FN_IS_DSINTERVAL -- FN_IS_NUMBER -- FN_IS_TIMESTAMP -- FN_IS_YMINTERVAL -- FN_JSON_VALUE -- FN_LEAST -- FN_LENGTH -- FN_LN -- FN_LPAD -- FN_LOCALTIMESTAMP -- FN_LOCATE -- FN_LOG -- FN_LOWER -- FN_LTRIM -- FN_MINUTE -- FN_MINUTES_BETWEEN -- FN_MOD -- FN_MONTH -- FN_MONTHS_BETWEEN -- FN_MULT -- FN_NEG -- FN_NULLIFZERO -- FN_NUMTODSINTERVAL -- FN_NUMTOYMINTERVAL -- FN_OCTET_LENGTH -- FN_POSIX_TIME -- FN_POWER -- FN_RADIANS -- FN_RAND -- FN_REGEXP_INSTR -- FN_REGEXP_REPLACE -- FN_REGEXP_SUBSTR -- FN_REPEAT -- FN_REPLACE -- FN_REVERSE -- FN_RIGHT -- FN_ROUND -- FN_RPAD -- FN_RTRIM -- FN_SECOND -- FN_SECONDS_BETWEEN -- FN_SESSIONTIMEZONE -- FN_SESSION_PARAMETER -- FN_SIGN -- FN_SIN -- FN_SINH -- FN_SOUNDEX -- FN_SPACE -- FN_SQRT -- FN_ST_AREA -- FN_ST_BOUNDARY -- FN_ST_BUFFER -- FN_ST_CENTROID -- FN_ST_CONTAINS -- FN_ST_CONVEXHULL -- FN_ST_CROSSES -- FN_ST_DIFFERENCE -- FN_ST_DIMENSION -- FN_ST_DISJOINT -- FN_ST_DISTANCE -- FN_ST_ENDPOINT -- FN_ST_ENVELOPE -- FN_ST_EQUALS -- FN_ST_EXTERIORRING -- FN_ST_FORCE2D -- FN_ST_GEOMETRYN -- FN_ST_GEOMETRYTYPE -- FN_ST_INTERIORRINGN -- FN_ST_INTERSECTION -- FN_ST_INTERSECTS -- FN_ST_ISCLOSED -- FN_ST_ISEMPTY -- FN_ST_ISRING -- FN_ST_ISSIMPLE -- FN_ST_LENGTH -- FN_ST_NUMGEOMETRIES -- FN_ST_NUMINTERIORRINGS -- FN_ST_NUMPOINTS -- FN_ST_OVERLAPS -- FN_ST_POINTN -- FN_ST_SETSRID -- FN_ST_STARTPOINT -- FN_ST_SYMDIFFERENCE -- FN_ST_TOUCHES -- FN_ST_TRANSFORM -- FN_ST_UNION -- FN_ST_WITHIN -- FN_ST_X -- FN_ST_Y -- FN_SUBSTR -- FN_SUB -- FN_SYS_GUID -- FN_SYSDATE -- FN_SYSTIMESTAMP -- FN_TAN -- FN_TANH -- FN_TO_CHAR -- FN_TO_DATE -- FN_TO_DSINTERVAL -- FN_TO_NUMBER -- FN_TO_TIMESTAMP -- FN_TO_YMINTERVAL -- FN_TRANSLATE -- FN_TRIM -- FN_TRUNC -- FN_UNICODE -- FN_UNICODECHR -- FN_UPPER -- FN_WEEK -- FN_YEAR -- FN_YEARS_BETWEEN -- FN_ZEROIFNULL - -## [Aggregate Function Capabilities](https://github.com/exasol/virtual-schema-common-java/blob/master/src/main/java/com/exasol/adapter/capabilities/AggregateFunctionCapability.java) - -- FN_AGG_APPROXIMATE_COUNT_DISTINCT -- FN_AGG_AVG -- FN_AGG_AVG_DISTINCT -- FN_AGG_COUNT -- FN_AGG_COUNT_DISTINCT -- FN_AGG_COUNT_STAR -- FN_AGG_FIRST_VALUE -- FN_AGG_GEO_INTERSECTION_AGGREGATE -- FN_AGG_GEO_UNION_AGGREGATE -- FN_AGG_GROUP_CONCAT -- FN_AGG_GROUP_CONCAT_DISTINCT -- FN_AGG_GROUP_CONCAT_ORDER_BY -- FN_AGG_GROUP_CONCAT_SEPARATOR -- FN_AGG_LAST_VALUE -- FN_AGG_MAX -- FN_AGG_MEDIAN -- FN_AGG_MIN -- FN_AGG_MUL -- FN_AGG_STDDEV -- FN_AGG_STDDEV_DISTINCT -- FN_AGG_STDDEV_POP -- FN_AGG_STDDEV_POP_DISTINCT -- FN_AGG_STDDEV_SAMP -- FN_AGG_STDDEV_SAMP_DISTINCT -- FN_AGG_SUM -- FN_AGG_SUM_DISTINCT -- FN_AGG_VARIANCE -- FN_AGG_VARIANCE_DISTINCT -- FN_AGG_VAR_POP -- FN_AGG_VAR_POP_DISTINCT -- FN_AGG_VAR_SAMP -- FN_AGG_VAR_SAMP_DISTINCT \ No newline at end of file diff --git a/doc/development/api/scalar_functions_api.md b/doc/development/api/scalar_functions_api.md deleted file mode 100644 index 6e793d62c..000000000 --- a/doc/development/api/scalar_functions_api.md +++ /dev/null @@ -1,439 +0,0 @@ -# Exasol Scalar Functions API - -This page describes how Exasol scalar functions map to the Virtual Schemas push-down request API. - -## Exasol Scalar Functions List - -### Functions With a Common API - -The majority of the functions supported by the Exasol database shares a common API syntax depending on the number of function arguments: - -* [Functions without arguments](#functions-without-arguments); -* [Functions with a single argument](#functions-with-a-single-argument); -* [Functions with two or more arguments](#functions-with-two-or-more-arguments); -* [Functions with a variable number of arguments](#functions-with-a-variable-number-of-arguments). - Here belong a few functions, some of them are treated as a function with variable number of arguments despite the fact that actually the number of arguments is limited: - BIT_TO_NUM, CONCAT, DUMP, GREATEST, HASH_*, INSERT, INSTR, LEAST, LOCATE, REGEXP_INSTR, REGEXP_REPLACE, REGEXP_SUBSTR. - -Note that function names go to the `` placeholder of the API examples. - -The functions that do not belong to this common API group are described in the following sections: - -- [Functions with a special API](#functions-with-a-special-api) -- [Functions not included in the the API](#functions-not-included-in-the-api) - -### Functions With a Special API - -This section contains functions that have a special API mapping. - -| Function Name | API mapping link | -|-------------------|---------------------------------------------| -| EXTRACT | [EXTRACT function](#extract-function) | -| CASE | [CASE function](#case-function) | -| CAST | [CAST function](#cast-function) | -| JSON_VALUE | [JSON_VALUE function](#json_value-function) | - -### Functions not Included in the API - -This section contains Exasol functions which do not appear in the API. -See [Additional Information](#additional-information) for an explanation why some functions do not appear in the API. - -| Function Name | Comment | -|------------------|---------------------------------------------------------------------------------------------| -| CEILING | API uses the CEIL function. | -| CHAR | API uses the CHR function. | -| CHARACTER_LENGTH | API uses the LENGTH function. | -| COALESCE | API uses the CASE function. | -| CONVERT | API uses the CAST function. | -| CURDATE | API uses the CURRENT_DATE function. | -| DECODE | API uses the CASE function. | -| IPROC | Does not appear in the API. | -| LCASE | API uses the LOWER function. | -| LEFT | API uses the SUBSTR function. The `position argument` is always set to 1. | -| LOG10 | API uses the LOG function, one argument is always a `literal_exactnumeric` with a value 10. | -| LOG2 | API uses the LOG function, one argument is always a `literal_exactnumeric` with a value 2. | -| MID | API uses the SUBSTR function. | -| NVL | API uses the CASE function. | -| NVL2 | API uses the CASE function. | -| NOW | API uses the CURRENT_TIMESTAMP function. | -| NPROC | Does not appear in the API. | -| NULLIF | API uses the CASE function. | -| PI | Does not appear in the API. | -| POSITION | API uses the INSTR function with arguments `string` and `search_string`. | -| RANDOM | API uses the RAND function. | -| ROWID | Does not appear in the API. | -| ROWNUM | Does not appear in the API. | -| SCOPE_USER | Does not appear in the API. | -| SUBSTRING | API uses the SUBSTR function. | -| TRUNCATE | API uses the TRUNC function. | -| UCASE | API uses the UPPER function. | -| USER | API uses the CURRENT_USER function. | -| VALUE2PROC | Does not appear in the API. | - -* Functions for hierarchical queries are not in the API. - -## Scalar Functions API - -### Functions Without Arguments - -A scalar function without arguments has the following JSON structure: - -```json -{ - "type": "function_scalar", - "name": "", - "numArgs": 0, - "arguments": [] -} -``` - -### Functions With a Single Argument - -A scalar function with a single argument has the following JSON structure: - -```json -{ - "type": "function_scalar", - "name": "", - "numArgs": 1, - "arguments": [ - { - ... - } - ] -} -``` - -For example, for the query `SELECT ABS(c5) FROM VIRTUAL_SCHEMA_EXASOL.ALL_EXASOL_TYPES` the scalar function part of the JSON request might look like this: - -```json -{ - "type": "function_scalar", - "name": "ABS", - "numArgs": 1, - "arguments": [ - { - "columnNr": 4, - "name": "C5", - "tableName": "ALL_EXASOL_TYPES", - "type": "column" - } - ] -} -``` - -### Functions With Two or More Arguments - -A scalar function with two arguments has the following JSON structure: - -```json -{ - "type": "function_scalar", - "name": "", - "numArgs": 2, - "arguments": [ - { - ... - }, - { - ... - } - ] -} -``` - -If a function has more than two arguments, the `numArgs` field has a different value corresponding to the number of arguments. -Also, the `arguments` list has a corresponding amount of nested elements. - -Let us check an example of the API part containing the scalar function with two arguments for the following query `SELECT ATAN2(c5, c6) FROM VIRTUAL_SCHEMA_EXASOL.ALL_EXASOL_TYPES`: - -```json -{ - "type": "function_scalar", - "name": "ATAN2", - "numArgs": 2, - "arguments": [ - { - "columnNr": 4, - "name": "C5", - "tableName": "ALL_EXASOL_TYPES", - "type": "column" - }, - { - "columnNr": 5, - "name": "C6", - "tableName": "ALL_EXASOL_TYPES", - "type": "column" - } - ] -} -``` - -### Functions With a Variable Number of Arguments - -Some scalar functions do not have a constant number of arguments. A function with a variable number of arguments has the following JSON structure: - -```json -{ - "type": "function_scalar", - "name": "", - "variableInputArgs" : true, - "arguments": [ - ... - ] -} -``` - -For example, for the query `SELECT CONCAT('prefix_', c2) VIRTUAL_SCHEMA_EXASOL.ALL_EXASOL_TYPES` the scalar function part of the JSON request looks like this: - -```json -{ - "type": "function_scalar", - "name": "CONCAT", - "variableInputArgs": true, - "arguments": [ - { - "type": "literal_string", - "value": "prefix_" - }, - { - "columnNr": 1, - "name": "C2", - "tableName": "ALL_EXASOL_TYPES", - "type": "column" - } - ] -} -``` - -### EXTRACT Function - -`EXTRACT(toExtract FROM exp1)` (requires scalar-function capability `EXTRACT`). - -The EXTRACT function takes one argument and has a special field `toExtract`. - -```json -{ - "type": "function_scalar_extract", - "name": "EXTRACT", - "toExtract": "", - "arguments": [ - { - ... - } - ] -} -``` - -### CAST function - -`CAST(exp1 AS dataType)` (requires scalar-function capability `CAST`). - -The CAST function takes one argument and has a special field `dataType` describing the datatype to cast to. - -```json -{ - "type": "function_scalar_cast", - "name": "CAST", - "arguments": [ - { - ... - } - ], - "dataType": { - ... - } -} -``` -For example, for the query `SELECT CAST(c5 AS VARCHAR(10)) FROM VIRTUAL_SCHEMA_EXASOL.ALL_EXASOL_TYPES` the CAST function part of the JSON request will look like this: - -```json -{ - "type": "function_scalar_cast", - "name": "CAST", - "arguments": [ - { - "columnNr": 4, - "name": "C5", - "tableName": "ALL_EXASOL_TYPES", - "type": "column" - } - ], - "dataType": { - "size": 10, - "type": "VARCHAR" - } -} -``` - - ### CASE function - -`CASE` (requires scalar-function capability `CASE`) - -```sql -CASE basis WHEN exp1 THEN result1 - WHEN exp2 THEN result2 - ELSE result3 - END -``` - -```json -{ - "type": "function_scalar_case", - "name": "CASE", - "basis": { - ... - }, - "arguments": [ - ... - ], - "results": [ - ... - ] -} -``` - -Notes: -* `arguments`: The different cases. -* `results`: The different results in the same order as the arguments. If present, the ELSE result is the last entry in the `results` array. - -Here is an example of a query containing a CASE function and its JSON representation (only the function part): - -```sql -SELECT CASE grade - WHEN 1 THEN 'GOOD' - WHEN 2 THEN 'FAIR' - WHEN 3 THEN 'POOR' - ELSE 'INVALID' - END -FROM VIRTUAL_SCHEMA_EXASOL.ALL_EXASOL_TYPES; -``` - -```json -{ - "type": "function_scalar_case", - "name": "CASE", - "basis": { - "columnNr": 4, - "name": "grade", - "tableName": "ALL_EXASOL_TYPES", - "type": "column" - }, - "arguments": [ - { - "type": "literal_exactnumeric", - "value": "1" - }, - { - "type": "literal_exactnumeric", - "value": "2" - }, - { - "type": "literal_exactnumeric", - "value": "3" - } - ], - "results": [ - { - "type": "literal_string", - "value": "GOOD" - }, - { - "type": "literal_string", - "value": "FAIR" - }, - { - "type": "literal_string", - "value": "POOR" - }, - { - "type": "literal_string", - "value": "INVALID" - } - ] -} -``` - -### JSON_VALUE Function - -`JSON_VALUE(arg1, arg2 RETURNING dataType {ERROR | NULL | DEFAULT exp1} ON EMPTY {ERROR | NULL | DEFAULT exp2} ON ERROR)` - (requires scalar-function capability `JSON_VALUE`) - -```json -{ - "type": "function_scalar_json_value", - "name": "JSON_VALUE", - "arguments": - [ - { - ... - }, - { - ... - } - ], - "returningDataType": dataType, - "emptyBehavior": - { - "type": "ERROR" - }, - "errorBehavior": - { - "type": "DEFAULT", - "expression": exp2 - } -} -``` - -Notes: - -* `arguments`: Contains two entries: The JSON item and the path specification. -* `emptyBehavior` and `errorBehavior`: `type` is `"ERROR"`, `"NULL"`, or `"DEFAULT"`. Only for `"DEFAULT"` the member `expression` containing the default value exists. - -### ADD / SUB / MULT / FLOAT_DIV - -Arithmetic operators have following names: `ADD`, `SUB`, `MULT`, `FLOAT_DIV`. They are defined as infix (just a hint, not necessary). - -```json -{ - "type": "function_scalar", - "numArgs": 2, - "name": "ADD", - "infix": true, - "arguments": [ - { - ... - }, - { - ... - } - ] -} -``` - -## Additional Information - -A scalar function, that does not contain any column references, is executed before reaching Virtual Schemas. -That means the JSON request does not contain the scalar function, but a literal value representing its result. -For example, the query `SELECT ABS(-123), c5 FROM VIRTUAL_SCHEMA_EXASOL.ALL_EXASOL_TYPES` will have the following select list: - -```json -{ - ... - - "selectList": [ - { - "type": "literal_exactnumeric", - "value": "123" - }, - { - "type": "column", - "tableName": "ALL_EXASOL_TYPES", - "columnNr": 4, - "name": "C5" - } - ], - - ... -} -``` diff --git a/doc/development/api/virtual_schema_api.md b/doc/development/api/virtual_schema_api.md deleted file mode 100644 index 4e4f767a9..000000000 --- a/doc/development/api/virtual_schema_api.md +++ /dev/null @@ -1,1210 +0,0 @@ -# Virtual Schema API Documentation - -## Table of Contents -- [Introduction](#introduction) -- [Requests and Responses](#requests-and-responses) - - [Create Virtual Schema](#create-virtual-schema) - - [Refresh](#refresh) - - [Set Properties](#set-properties) - - [Drop Virtual Schema](#drop-virtual-schema) - - [Get Capabilities](#get-capabilities) - - [Pushdown](#pushdown) -- [Embedded Commonly Used Json Elements](#embedded-commonly-used-json-elements) - - [Schema Metadata Info](#schema-metadata-info) - - [Schema Metadata](#schema-metadata) -- [Expressions](#expressions) - - [Table](#table) - - [Join](#join) - - [Column Lookup](#column-lookup) - - [Literal](#literal) - - [Predicates](#predicates) - - [Scalar Functions](#scalar-functions) - - [Aggregate Functions](#aggregate-functions) - -## Introduction - -There are the following request and response types: - -| Type | Called ... | -| :-------------------------- | :-------------------------------------------------------------------- | -| **Create Virtual Schema** | … for each `CREATE VIRTUAL SCHEMA ...` statement | -| **Refresh** | … for each `ALTER VIRTUAL SCHEMA ... REFRESH ...` statement. | -| **Set Properties** | … for each `ALTER VIRTUAL SCHEMA ... SET ...` statement. | -| **Drop Virtual Schema** | … for each `DROP VIRTUAL SCHEMA ...` statement. | -| **Get Capabilities** | … whenever a virtual table is queried in a `SELECT` statement. | -| **Pushdown** | … whenever a virtual table is queried in a `SELECT` statement. | - -We describe each of the types in the following sections. - -**Please note:** To keep the documentation concise we defined the elements which are commonly in separate sections below, e.g. `schemaMetadataInfo` and `schemaMetadata`. - -## Requests and Responses - -### Create Virtual Schema - -Informs the Adapter about the request to create a Virtual Schema, and asks the Adapter for the metadata (tables and columns). - -The Adapter is allowed to throw an Exception if the user missed to provide mandatory properties or in case of any other problems (e.g. connectivity). - -**Request:** - -```json -{ - "type": "createVirtualSchema", - "schemaMetadataInfo": { - ... - } -} -``` - -**Response:** - -```json -{ - "type": "createVirtualSchema", - "schemaMetadata": { - ... - } -} -``` - -Notes -* `schemaMetadata` is mandatory. However, it is allowed to contain no tables. - - -### Refresh - -Request to refresh the metadata for the whole Virtual Schema, or for specified tables. - -**Request:** - -```json -{ - "type": "refresh", - "schemaMetadataInfo": { - ... - }, - "requestedTables": ["T1", "T2"] -} -``` - -Notes -* `requestedTables` is optional. If existing, only the specified tables shall be refreshed. The specified tables do not have to exist, it just tell Adapter to update these tables (which might be changed, deleted, added, or non-existing). - -**Response:** - -```json -{ - "type": "refresh", - "schemaMetadata": { - ... - }, - "requestedTables": ["T1", "T2"] -} -``` - -Notes -* `schemaMetadata` is optional. It can be skipped if the adapter does not want to refresh (e.g. because he detected that there is no change). -* `requestedTables` must exist if and only if the element existed in the request. The values must be the same as in the request (to make sure that Adapter only refreshed these tables). - -### Set Properties - -Request to set properties. The Adapter can decide whether he needs to send back new metadata. The Adapter is allowed to throw an Exception if the user provided invalid properties or in case of any other problems (e.g. connectivity). - -**Request:** - -```json -{ - "type": "setProperties", - "schemaMetadataInfo": { - ... - }, - "properties": { - "JDBC_CONNECTION_STRING": "new-jdbc-connection-string", - "NEW_PROPERTY": "value of a not yet existing property", - "DELETED_PROPERTY": null - } -} -``` - -**Response:** - -```json -{ - "type": "setProperties", - "schemaMetadata": { - ... - } -} -``` - -Notes -* Request: A property set to null means that this property was asked to be deleted. Properties set to null might also not have existed before. -* Response: `schemaMetadata` is optional. It only exists if the adapter wants to send back new metadata. The existing metadata are overwritten completely. - - -### Drop Virtual Schema - -Inform the Adapter that a Virtual Schema is about to be dropped. The Adapter can update external dependencies if he has such. The Adapter is not expected to throw an exception, and if he does, it will be ignored. - -**Request:** - -```json -{ - "type": "dropVirtualSchema", - "schemaMetadataInfo": { - ... - } -} -``` - -**Response:** - -```json -{ - "type": "dropVirtualSchema" -} -``` - - -### Get Capabilities - -Request the list of capabilities supported by the Adapter. Based on these capabilities, the database will collect everything that can be pushed down in the current query and sends a pushdown request afterwards. - -**Request:** - -```json -{ - "type": "getCapabilities", - "schemaMetadataInfo": { - ... - } -} -``` - -**Response:** - -```json -{ - "type": "getCapabilities", - "capabilities": [ - "ORDER_BY_COLUMN", - "AGGREGATE_SINGLE_GROUP", - "LIMIT", - "AGGREGATE_GROUP_BY_TUPLE", - "FILTER_EXPRESSIONS", - "SELECTLIST_EXPRESSIONS", - "SELECTLIST_PROJECTION", - "AGGREGATE_HAVING", - "ORDER_BY_EXPRESSION", - "AGGREGATE_GROUP_BY_EXPRESSION", - "LIMIT_WITH_OFFSET", - "AGGREGATE_GROUP_BY_COLUMN", - "FN_PRED_LESSEQUALS", - "FN_AGG_COUNT", - "LITERAL_EXACTNUMERIC", - "LITERAL_DATE", - "LITERAL_INTERVAL", - "LITERAL_TIMESTAMP_UTC", - "LITERAL_TIMESTAMP", - "LITERAL_NULL", - "LITERAL_STRING", - "LITERAL_DOUBLE", - "LITERAL_BOOL" - ] -} -``` - -The set of capabilities in the example above would be sufficient to pushdown all aspects of the following query: -```sql -SELECT user_id, COUNT(url) -FROM vs.clicks -WHERE user_id>1 -GROUP BY user_id -HAVING count(url)>1 -ORDER BY user_id -LIMIT 10; -``` - -##### Capability Prefixes - -- Main Capabilities: No prefix -- Literal Capabilities: LITERAL_ -- Predicate Capabilities: FN_PRED_ -- Scalar Function Capabilities: FN_ -- Aggregate Function Capabilities: FN_AGG_ - -See also [a list of supported Capabilities](capabilities_list.md). - -Capabilities can be also found in the sources of the Virtual Schema Common Java: -* [Main Capabilities](https://github.com/exasol/virtual-schema-common-java/blob/master/src/main/java/com/exasol/adapter/capabilities/MainCapability.java) -* [Literal Capabilities](https://github.com/exasol/virtual-schema-common-java/blob/master/src/main/java/com/exasol/adapter/capabilities/LiteralCapability.java) -* [Predicate Capabilities](https://github.com/exasol/virtual-schema-common-java/blob/master/src/main/java/com/exasol/adapter/capabilities/PredicateCapability.java) -* [Scalar Function Capabilities](https://github.com/exasol/virtual-schema-common-java/blob/master/src/main/java/com/exasol/adapter/capabilities/ScalarFunctionCapability.java) -* [Aggregate Function Capabilities](https://github.com/exasol/virtual-schema-common-java/blob/master/src/main/java/com/exasol/adapter/capabilities/AggregateFunctionCapability.java) - -### Pushdown - -Contains an abstract specification of what to be pushed down, and requests an pushdown SQL statement from the Adapter which can be used to retrieve the requested data. - -**Request:** - -Running the following query -```sql -SELECT user_id, COUNT(url) -FROM vs.clicks -WHERE user_id>1 -GROUP BY user_id -HAVING count(url)>1 -ORDER BY user_id -LIMIT 10; -``` -will produce the following Request, assuming that the Adapter has all required capabilities. - -```json -{ - "type": "pushdown", - "pushdownRequest": { - "type" : "select", - "aggregationType" : "group_by", - "from" : - { - "type" : "table", - "name" : "CLICKS" - }, - "selectList" : - [ - { - "type" : "column", - "name" : "USER_ID", - "columnNr" : 1, - "tableName" : "CLICKS" - }, - { - "type" : "function_aggregate", - "name" : "count", - "arguments" : - [ - { - "type" : "column", - "name" : "URL", - "columnNr" : 2, - "tableName" : "CLICKS" - } - ] - } - ], - "filter" : - { - "type" : "predicate_less", - "left" : - { - "type" : "literal_exactnumeric", - "value" : "1" - }, - "right" : - { - "type" : "column", - "name" : "USER_ID", - "columnNr" : 1, - "tableName" : "CLICKS" - } - }, - "groupBy" : - [ - { - "type" : "column", - "name" : "USER_ID", - "columnNr" : 1, - "tableName" : "CLICKS" - } - ], - "having" : - { - "type" : "predicate_less", - "left" : - { - "type" : "literal_exactnumeric", - "value" : "1" - }, - "right" : - { - "type" : "function_aggregate", - "name" : "count", - "arguments" : - [ - { - "type" : "column", - "name" : "URL", - "columnNr" : 2, - "tableName" : "CLICKS" - } - ] - } - }, - "orderBy" : - [ - { - "type" : "order_by_element", - "expression" : - { - "type" : "column", - "columnNr" : 1, - "name" : "USER_ID", - "tableName" : "CLICKS" - }, - "isAscending" : true, - "nullsLast" : true - } - ], - "limit" : - { - "numElements" : 10 - } - }, - "involvedTables": [ - { - "name" : "CLICKS", - "columns" : - [ - { - "name" : "ID", - "dataType" : - { - "type" : "DECIMAL", - "precision" : 18, - "scale" : 0 - } - }, - { - "name" : "USER_ID", - "dataType" : - { - "type" : "DECIMAL", - "precision" : 18, - "scale" : 0 - } - }, - { - "name" : "URL", - "dataType" : - { - "type" : "VARCHAR", - "size" : 1000 - } - }, - { - "name" : "REQUEST_TIME", - "dataType" : - { - "type" : "TIMESTAMP" - } - } - ] - } - ], - "schemaMetadataInfo": { - ... - } -} -``` - -Notes -* `pushdownRequest`: Specification what needs to be pushed down. You can think of it like a parsed SQL statement. - * `from`: The requested from clause. This can be a table or a join. - * `selectList`: The requested select list elements, a list of expression. The order of the selectlist elements matters. If the select list is an empty list, we request at least a single column/expression, which could also be constant TRUE. - * `selectList.columnNr`: Position of the column in the virtual table, starting with 0 - * `filter`: The requested filter (`where` clause), a single expression. - * `aggregationType`Optional element, set if an aggregation is requested. Either `group_by` or `single_group`, if a aggregate function is used but no group by. - * `groupBy`: The requested group by clause, a list of expressions. - * `having`: The requested having clause, a single expression. - * `orderBy`: The requested order-by clause, a list of `order_by_element` elements. The field `expression` contains the expression to order by. - * `limit` The requested limit of the result set, with an optional offset. -* `involvedTables`: Metadata of the involved tables, encoded like in schemaMetadata. - - -**Response:** - -Following the example above, a valid result could look like this: - -```json -{ - "type": "pushdown", - "sql": "IMPORT FROM JDBC AT 'jdbc:exa:remote-db:8563;schema=native' USER 'sys' IDENTIFIED BY 'exasol' STATEMENT 'SELECT USER_ID, count(URL) FROM NATIVE.CLICKS WHERE 1 < USER_ID GROUP BY USER_ID HAVING 1 < count(URL) ORDER BY USER_ID LIMIT 10'" -} -``` - -Notes -* `sql`: The pushdown SQL statement. It must be either an `SELECT` or `IMPORT` statement. - -## Embedded Commonly Used JSON Elements - -The following Json objects can be embedded in a request or response. They have a fixed structure. - -### Schema Metadata Info -This document contains the most important metadata of the virtual schema and is sent to the adapter just "for information" with each request. It is the value of an element called `schemaMetadataInfo`. - -```json -{"schemaMetadataInfo":{ - "name": "MY_HIVE_VSCHEMA", - "adapterNotes": "", - "properties": { - "HIVE_SERVER": "my-hive-server", - "HIVE_DB": "my-hive-db", - "HIVE_USER": "my-hive-user" - } -}} -``` - -### Schema Metadata - -This document is usually embedded in responses from the Adapter and informs the database about all metadata of the Virtual Schema, especially the contained Virtual Tables and its columns. - -The Adapter can optionally store so called `adapterNotes` on each level (schema, table, column), to remember information which might be relevant for the Adapter in future. Adapter notes are simple strings. You can serialize objects into those strings of course, but keep in mind that the strings are embedded inside the Virtual Schemas JSON protocol, which makes quoting of conflicting characters necessary. - -Some options to deal with the embedding issue: - -1. After serialization use Base64 encoding or -1. Use a serialization that does not have conflicting characters like a simple CSV or key-value format or -1. Quote conflicting characters - -Which variant you should choose depends on considerations like amount of data to be transmitted, original data format and encoding overhead. - -In the example below, the Adapter remembers the table partitioning and the data type of a column which is not directly supported in Exasol. The Adapter has this information during push-down and can consider the table partitioning during push-down or can add an appropriate cast for the column. - -This example also demonstrates serialization in adapter notes via key-value encoding. As mentioned above more sophisticated serializations are possible as long as you make sure adapter notes are a valid string in the JSON format by encoding or quoting. - -```json -{"schemaMetadata":{ - "adapterNotes": "lastRefreshed=2015-03-01 12:10:01;anotherKey=More custom schema state here", - "tables": [ - { - "type": "table", - "name": "EXASOL_CUSTOMERS", - "adapterNotes": "hivePartitionColumns=CREATED,COUNTRY_ISO", - "columns": [ - { - "name": "ID", - "dataType": { - "type": "DECIMAL", - "precision": 18, - "scale": 0 - }, - "isIdentity": true - }, - { - "name": "COMPANY_NAME", - "dataType": { - "type": "VARCHAR", - "size": 1000, - "characterSet": "UTF8" - }, - "default": "foo", - "isNullable": false, - "comment": "The official name of the company", - "adapterNotes": "hiveDataType=List" - }, - { - "name": "DISCOUNT_RATE", - "dataType": { - "type": "DOUBLE" - } - } - ] - }, - { - "type": "table", - "name": "TABLE_2", - "columns": [ - { - "name": "COL1", - "dataType": { - "type": "DECIMAL", - "precision": 18, - "scale": 0 - } - }, - { - "name": "COL2", - "dataType": { - "type": "VARCHAR", - "size": 1000 - } - } - ] - } - ] -}} -``` - -The following EXASOL data types are supported: - -#### Decimal - -```json -{ - "name": "C_DECIMAL", - "dataType": { - "type": "DECIMAL", - "precision": 18, - "scale": 2 - } -} -``` - -#### Double - -```json -{ - "name": "C_DOUBLE", - "dataType": { - "type": "DOUBLE" - } -} -``` - -#### Varchar - -```json -{ - "name": "C_VARCHAR_UTF8_1", - "dataType": { - "type": "VARCHAR", - "size": 10000, - "characterSet": "UTF8" - } -} -``` - -```json -{ - "name": "C_VARCHAR_UTF8_2", - "dataType": { - "type": "VARCHAR", - "size": 10000 - } -} -``` - -```json -{ - "name": "C_VARCHAR_ASCII", - "dataType": { - "type": "VARCHAR", - "size": 10000, - "characterSet": "ASCII" - } -} -``` - -#### Char - -```json -{ - "name": "C_CHAR_UTF8_1", - "dataType": { - "type": "CHAR", - "size": 3 - } -} -``` - -```json -{ - "name": "C_CHAR_UTF8_2", - "dataType": { - "type": "CHAR", - "size": 3, - "characterSet": "UTF8" - } -} -``` - -```json -{ - "name": "C_CHAR_ASCII", - "dataType": { - "type": "CHAR", - "size": 3, - "characterSet": "ASCII" - } -} -``` - -#### Date - -```json -{ - "name": "C_DATE", - "dataType": { - "type": "DATE" - } -} -``` - -#### Timestamp - -```json -{ - "name": "C_TIMESTAMP_1", - "dataType": { - "type": "TIMESTAMP" - } -} -``` -```json -{ - "name": "C_TIMESTAMP_2", - "dataType": { - "type": "TIMESTAMP", - "withLocalTimeZone": false - } -} -``` -```json -{ - "name": "C_TIMESTAMP_3", - "dataType": { - "type": "TIMESTAMP", - "withLocalTimeZone": true - } -} -``` - -#### Boolean - -```json -{ - "name": "C_BOOLEAN", - "dataType": { - "type": "BOOLEAN" - } -} -``` - -#### Geometry - -```json -{ - "name": "C_GEOMETRY", - "dataType": { - "type": "GEOMETRY", - "srid": 1 - } -} -``` - -#### Interval - -```json -{ - "name": "C_INTERVAL_DS_1", - "dataType": { - "type": "INTERVAL", - "fromTo": "DAY TO SECONDS" - } -} -``` - -```json -{ - "name": "C_INTERVAL_DS_2", - "dataType": { - "type": "INTERVAL", - "fromTo": "DAY TO SECONDS", - "precision": 3, - "fraction": 4 - } -} -``` - -```json -{ - "name": "C_INTERVAL_YM_1", - "dataType": { - "type": "INTERVAL", - "fromTo": "YEAR TO MONTH" - } -} -``` - -```json -{ - "name": "C_INTERVAL_YM_2", - "dataType": { - "type": "INTERVAL", - "fromTo": "YEAR TO MONTH", - "precision": 3 - } -} -``` - -#### Hashtype - -```json -{ - "name": "C_HASHTYPE", - "dataType": { - "type" : "HASHTYPE", - "bytesize" : 16 - - } -} -``` - -## Expressions - -This section handles the expressions that can occur in a pushdown request. Expressions are consistently encoded in the following way. This allows easy and consisting parsing and serialization. - -```json -{ - "type": "", - ... -} -``` - -Each expression-type can have any number of additional fields of arbitrary type. In the following sections we define the known expressions. - -### Table - -This element currently only occurs in from clause - -```json -{ - "type": "table", - "name": "CLICKS", - "alias": "A" -} -``` - -Notes -* **alias**: This is an optional property and is added if the table has an alias in the original query. - -### Join - -This element currently only occurs in from clause - -```json -{ - "type": "join", - "join_type": "inner", - "left": { - ... - }, - "right" : { - ... - }, - "condition" : { - ... - } -} -``` - -Notes -* **join_type**: Can be `inner`, `left_outer`, `right_outer` or `full_outer`. -* **left**: This can be a `table` or a `join`. -* **right**: This can be a `table` or a `join`. -* **condition**: This can be an arbitrary expression. - -### Column Lookup - -A column lookup is a reference to a table column. It can reference the table directly or via an alias. - -```json -{ - "type": "column", - "tableName": "T", - "tableAlias": "A", - "columnNr": 0, - "name": "ID" -} -``` - -Notes -* **tableAlias**: This is an optional property and is added if the referenced table has an alias. -* **columnNr**: Column number in the virtual table, starting with 0. - -### Literal - -```json -{ - "type": "literal_null" -} -``` - -```json -{ - "type": "literal_string", - "value": "my string" -} -``` - -```json -{ - "type": "literal_double", - "value": "1.234" -} -``` - -```json -{ - "type": "literal_exactnumeric", - "value": "12345" -} -``` - -```json -{ - "type": "literal_bool", - "value": true -} -``` - -```json -{ - "type": "literal_date", - "value": "2015-12-01" -} -``` - -```json -{ - "type": "literal_timestamp", - "value": "2015-12-01 12:01:01.1234" -} -``` - -```json -{ - "type": "literal_timestamputc", - "value": "2015-12-01 12:01:01.1234" -} -``` - -```json -{ - "type": "literal_interval", - "value": "+2-01", - "dataType": { - "type": "INTERVAL", - "fromTo": "YEAR TO MONTH", - "precision": 2 - } -} -``` - -```json -{ - "type": "literal_interval", - "value": "+0 00:00:02.000", - "dataType": { - "type": "INTERVAL", - "fromTo": "DAY TO SECONDS", - "precision": 2, - "fraction": 2 - } -} -``` - -### Predicates - -Whenever there is `...` this is a shortcut for an arbitrary expression. - -##### AND / OR - -```json -{ - "type": "predicate_and", - "expressions": [ - ... - ] -} -``` - -The same can be used for `predicate_or`. - -##### NOT / IS NULL / IS NOT NULL - -```json -{ - "type": "predicate_not", - "expression": { - ... - } -} -``` - -The same can be used for `predicate_is_null`, `predicate_is_not_null`. - -##### Comparison operators - -```json -{ - "type": "predicate_equal", - "left": { - ... - }, - "right": { - ... - } -} -``` - -The same can be used for `predicate_notequal`, `predicate_less` and `predicate_lessequal`. - -##### LIKE / REGEXP_LIKE - -```json -{ - "type": "predicate_like", - "expression": { - ... - }, - "pattern": { - ... - }, - "escapeChar": "%" -} -``` - -The same can be used for `predicate_like_regexp`. - -Notes -* **escapeChar** is optional - -##### BETWEEN - -```json -{ - "type": "predicate_between", - "expression": { - ... - }, - "left": { - ... - }, - "right": { - ... - } -} -``` - -##### IN - -` IN (, )` - -```json -{ - "type": "predicate_in_constlist", - "expression": { - ... - } - "arguments": [ - ... - ] -} -``` - -##### IS JSON / IS NOT JSON - -`exp1 IS JSON {VALUE | ARRAY | OBJECT | SCALAR} {WITH | WITHOUT} UNIQUE KEYS` - (requires predicate capability `IS_JSON`) - -```json -{ - "type": "predicate_is_json", - "expression": { - ... - }, - "typeConstraint": "VALUE", - "keyUniquenessConstraint": "WITHOUT UNIQUE KEYS" -} -``` - -Notes: - -- typeConstraint is `"VALUE"`, `"ARRAY"`, `"OBJECT"`, or `"SCALAR"`. -- keyUniquenessConstraint is `"WITH UNIQUE KEYS"` or `"WITHOUT UNIQUE KEYS"`. - -The same can be used for a predicate type `predicate_is_not_json` (requires predicate capability `IS_NOT_JSON`). - -### Scalar Functions - -Refer to the [Exasol Scalar Functions API Documentation](scalar_functions_api.md) - -### Aggregate Functions - -Consistent with scalar functions. To be detailed: `star-operator`, `distinct`, ... - -An aggregate function with a single argument (consistent with multiple argument version): - -```json -{ - "type": "function_aggregate", - "name": "SUM", - "arguments": [ - { - ... - } - ] -} -``` - -An aggregate function with multiple arguments: - -```json -{ - "type": "function_aggregate", - "name": "CORR", - "arguments": [ - { - ... - }, - { - ... - } - ] -} -``` - -#### Special Cases of Aggregate Functions - -##### COUNT(exp) - -`COUNT(exp)` - (requires set-function capability `COUNT`) - -```json -{ - "type": "function_aggregate", - "name": "COUNT", - "arguments": [ - { - ... - } - ] -} -``` -##### COUNT(*) - -`COUNT(*)` - (requires set-function capability `COUNT` and `COUNT_STAR`) - -```json -{ - "type": "function_aggregate", - "name": "COUNT" -} -``` - -##### COUNT(DISTINCT exp) - -`COUNT(DISTINCT exp)` - (requires set-function capability `COUNT` and `COUNT_DISTINCT`) - -```json -{ - "type": "function_aggregate", - "name": "COUNT", - "distinct": true, - "arguments": [ - { - ... - } - ] -} -``` - -##### COUNT((exp1, exp2)) - -`COUNT((exp1, exp2))` -(requires set-function capability `COUNT` and `COUNT_TUPLE`) - -```json -{ - "type": "function_aggregate", - "name": "COUNT", - "distinct": true, - "arguments": [ - { - ... - }, - { - ... - } - ] -} -``` - -##### AVG(exp) - -`AVG(exp)` - (requires set-function capability `AVG`) - -```json -{ - "type": "function_aggregate", - "name": "AVG", - "arguments": [ - { - ... - } - ] -} -``` - -##### AVG(DISTINCT exp) - -`AVG(DISTINCT exp)` - (requires set-function capability `AVG` and `AVG_DISTINCT`) - -```json -{ - "type": "function_aggregate", - "name": "AVG", - "distinct": true, - "arguments": [ - { - ... - } - ] -} -``` - -##### GROUP_CONCAT - -`GROUP_CONCAT(DISTINCT exp1 orderBy SEPARATOR ', ')` - (requires set-function capability `GROUP_CONCAT`) - -```json -{ - "type": "function_aggregate_group_concat", - "name": "GROUP_CONCAT", - "distinct": true, - "arguments": [ - { - ... - } - ], - "orderBy" : [ - { - "type" : "order_by_element", - "expression" : - { - "type" : "column", - "columnNr" : 1, - "name" : "USER_ID", - "tableName" : "CLICKS" - }, - "isAscending" : true, - "nullsLast" : true - } - ], - "separator": ", " -} -``` - -Notes: -* `distinct`: Optional. Requires set-function capability `GROUP_CONCAT_DISTINCT.` -* `orderBy`: Optional. The requested order-by clause, a list of `order_by_element` elements. The field `expression` contains the expression to order by. The `group by` clause of a `SELECT` query uses the same `order_by_element` element type. The clause requires the set-function capability `GROUP_CONCAT_ORDER_BY`. -* `separator`: Optional. Requires set-function capability `GROUP_CONCAT_SEPARATOR`. diff --git a/doc/development/developing-sql-dialect/developing_a_dialect.md b/doc/development/developing-sql-dialect/developing_a_dialect.md index 2dab9756a..99a823487 100644 --- a/doc/development/developing-sql-dialect/developing_a_dialect.md +++ b/doc/development/developing-sql-dialect/developing_a_dialect.md @@ -127,7 +127,6 @@ Please also remember to [document the SQL dialect](../../dialects). ## See Also * [Step-by-step guide to writing your own SQL dialect](step_by_step_guide_to_writing_your_own_dialect.md) -* [Virtual Schema API Documentation](../api/virtual_schema_api.md) * [Integration testing with containers](integration_testing_with_containers.md) * [Remote debugging](../remote_debugging.md) * [Versioning](../versioning.md) diff --git a/doc/development/developing-sql-dialect/integration_testing.md b/doc/development/developing-sql-dialect/integration_testing.md index 0c7a91291..5f914d131 100644 --- a/doc/development/developing-sql-dialect/integration_testing.md +++ b/doc/development/developing-sql-dialect/integration_testing.md @@ -63,5 +63,4 @@ ## See Also -* [Virtual Schema API Documentation](../api/virtual_schema_api.md) -* [Integration testing with containers](integration_testing_with_containers.md) +* [Integration testing with containers](integration_testing_with_containers.md) \ No newline at end of file