Virtual Schemas: Data types not compatible error in union all query
Details
| Detail name | Value |
|---|---|
| Changelog Number | 4367 |
| Type | Bug |
| Status | Open |
| Affected Versions | EXASOL 6.0.0 |
This error only occurs in special circumstances.
It is necessary that a query uses a virtual schema inside UNION ALL.
Additionally, the query needs a surrounding SELECT COUNT( * ) that makes
the column types inside the UNION ALL irrelevant. If a query uses
this combination, Exasol creates a pushdown request that contains
SELECT NULL. This causes datatype errors for some databases.
Reproducibility:
SELECT COUNT(*) FROM (SELECT c1 FROM VIRTUAL_SCHEMA.T1 UNION ALL SELECT c2 FROM SCHEMA2.T2)
Error:
[0A000] Feature not supported: datatypes are not compatible for Union
The PUSHDOWN_SQL (displayed with EXPLAIN VIRTUAL) contains:
SELECT NULL FROM VIRTUAL_SCHEMA.T1
Workaround:
Set the Exasol parameter -disableUnionAllOptimization=1 .