Skip to content

Commit

Permalink
Implement review findings
Browse files Browse the repository at this point in the history
  • Loading branch information
kaklakariada committed Feb 22, 2024
1 parent 2e86c0b commit 531c6f1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions doc/changes/changes_7.2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Code name: Add parameter `GENERATE_JDBC_DATATYPE_MAPPING_FOR_EXA`

Using `IMPORT FROM EXA` might lead to some unexpected datatype mappings. Unlike for a JDBC connection there's no explicit data mapping being generated when using `IMPORT FROM EXA`. The Exasol specific types `GEOMETRY`, `INTERVAL YEAR TO MONTH`, `INTERVAL DAY TO SECOND` and `HASHTYPE` are mapped to `VARCHAR`. This release adds parameter `GENERATE_JDBC_DATATYPE_MAPPING_FOR_EXA`. When setting this to `true`, the data types are mapped as expected.

Setting `GENERATE_JDBC_DATATYPE_MAPPING_FOR_EXA` to `true` also fixes a bug when joining a table in a virtual schema with a normal table using a `HASHTYPE` column. This failed before in Exasol 7.1 with error message `Feature not supported: Incomparable Types: VARCHAR(32) UTF8 and HASHTYPE(16 BYTE)!`.
Setting `GENERATE_JDBC_DATATYPE_MAPPING_FOR_EXA` to `true` also fixes a bug when joining a table in a virtual schema with a normal table on a `HASHTYPE` column. This failed before in Exasol 7.1 with error message `Feature not supported: Incomparable Types: VARCHAR(32) UTF8 and HASHTYPE(16 BYTE)!`.

See the [user guide](../dialects/exasol.md#auto-generated-datatype-mapping-using-exa-import) for details.
See the [user guide](../dialects/exasol.md#map-data-types-with-exa-import) for details.

This release also fixes vulnerabilities CVE-2024-25710 and CVE-2024-26308 in transitive test dependency `org.apache.commons:commons-compress`.

Expand Down
8 changes: 5 additions & 3 deletions doc/dialects/exasol.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@ USING SCHEMA_FOR_VS_SCRIPT.ADAPTER_SCRIPT_EXASOL WITH
EXA_CONNECTION = 'EXA_CONNECTION';
```

#### Auto-generated Datatype Mapping Using EXA Import
#### Map Datatypes With EXA Import

Using `IMPORT FROM EXA` might lead to some unexpected datatype mappings. Unlike for a JDBC connection there's no explicit data mapping being generated when using `IMPORT FROM EXA`. As a solution the Exasol Virtual Schema in version 7.2.0 and later supports parameter `GENERATE_JDBC_DATATYPE_MAPPING_FOR_EXA`:
Unlike for a JDBC connection `IMPORT FROM EXA` does not use an explicit datatype mapping. In consequence columns of type `HASHTYPE` are mapped to `VARCHAR` and joining such a column therefore failed in Exasol 7.1 with error message `Feature not supported: Incomparable Types: VARCHAR(32) UTF8 and HASHTYPE(16 BYTE)!`.

Exasol Virtual Schema in version 7.2.0 and later mitigates this by offering parameter `GENERATE_JDBC_DATATYPE_MAPPING_FOR_EXA` with values `true` and `false` (default):

```sql
CREATE VIRTUAL SCHEMA VIRTUAL_EXASOL
Expand All @@ -100,7 +102,7 @@ USING SCHEMA_FOR_VS_SCRIPT.ADAPTER_SCRIPT_EXASOL WITH

This will add explicit datatype mapping to the generated command when using `IMPORT FROM EXA`.

Example for the generated pushdown query with `GENERATE_JDBC_DATATYPE_MAPPING_FOR_EXA = 'false'`:
Example for the generated pushdown query with `GENERATE_JDBC_DATATYPE_MAPPING_FOR_EXA = 'false'` (default):

```sql
IMPORT FROM EXA AT "EXA_CONNECTION" STATEMENT '...'
Expand Down

0 comments on commit 531c6f1

Please sign in to comment.