(Sorry if any inconsistencies show up, but I have to put this down from memory)
Background
Exasol as remote database, not LOCAL.
EXA2EXA transfer mode (JDBC seems to work, so it is not directly a problem for all java-jdbc dialects)
Query
(simplified for reproduction)
select null as X from VIRTUAL_TABLE
UNION ALL
select 1 from dual;
Pushdown
IMPORT INTO ( X decimal(1) ) FROM EXA AT ...
STATEMENT 'select null as x from VIRTUAL_TABLE'
Problem
remote Exasol will use boolean as smallest possible type for a null literal without context
ExaLoader refuses to import a boolean type into a decimal type:
[Code: 0, SQL State: 42636] ETL-1299: Failed to create transformator for column=0 (starting from 0 for selected columns)
[ETL-1202: Not implemented - Transformation for this combination of column types is not possible in this version.
A solution for this problem can be perhaps the conversion in another datatype in the database.
Otherwise please contact support for additional information]
Workaround
Exclude the LITERAL_NULL capability for the virtual schema
Solution (?)
As the pushdown query clearly expects a certain data type here, it should be possible to cast the null value properly:
STATEMENT `select cact(null as decimal(1)) as X ...`
Caveat
This can only apply to null values that are direct literals in the select list...filters, subselects etc. can not be handled (filters with null work differently anyway, subselects are not implemented.)
Marking Source as "Customer", because it showed up during a live migration project, the Customer found the issue and its workaround (and is content using that). But having an intrinsic fix sounds like a good idea...
(Sorry if any inconsistencies show up, but I have to put this down from memory)
Background
Query
(simplified for reproduction)
Pushdown
Problem
boolean
as smallest possible type for anull
literal without contextboolean
type into adecimal
type:Workaround
Exclude the
LITERAL_NULL
capability for the virtual schemaSolution (?)
As the pushdown query clearly expects a certain data type here, it should be possible to cast the null value properly:
Caveat
This can only apply to
null
values that are direct literals in the select list...filters, subselects etc. can not be handled (filters with null work differently anyway, subselects are not implemented.)