Support HASHTYPE columns in select list with scalar emits function
Details
| Detail name | Value |
|---|---|
| Changelog Number | 13769 |
| Type | Bug |
| Status | Resolved |
| Affected Versions | Exasol 7.0.0, Exasol 7.1.0 |
| Fix Versions | Exasol 7.1.5, Exasol 7.0.15 |
| Resolution Date | 2022-01-26 |
Description
If a scalar emits function is used, it is not possible to have columns with type HASHTYPE before or after the scalar emits function in the select list. Exasol throws the error "Column type not supported" if a query contains this combination.
Preparation
CREATE SCHEMA test;
--/
CREATE OR REPLACE PYTHON3 SCALAR SCRIPT test.just_emitter (...) EMITS (...) AS
def run(ctx):
ctx.emit("Test output")
/
Example
-- This query causes the error SELECT HASHTYPE_SHA(1), test.just_emitter() EMITS (function_text varchar (500));
Workaround
Cast the HASHTYPE columns to CHAR.
SELECT CAST(HASHTYPE_SHA(1) as CHAR(40)), test.just_emitter() EMITS (function_text varchar (500));
Fix
The query does not return an error.