Kirill Tkalenko created IGNITE-29129:
----------------------------------------

             Summary: SQL Calcite: Fix CAST to VARCHAR for unmapped Java types
                 Key: IGNITE-29129
                 URL: https://issues.apache.org/jira/browse/IGNITE-29129
             Project: Ignite
          Issue Type: Bug
            Reporter: Kirill Tkalenko
            Assignee: Kirill Tkalenko


A {{CAST}} to {{VARCHAR}} failure was found in the {{SYS.TABLE_COLUMNS}} system 
view. Unmapped Java types should use Ignite’s {{OtherType}} and support the 
same conversion as an explicit {{OTHER}} column:
{code:java}
CREATE TABLE T (ID INT PRIMARY KEY, VAL OTHER);

INSERT INTO T VALUES (1, 'hello'), (2, 42), (3, NULL);

SELECT ID, CAST(VAL AS VARCHAR)
FROM T
ORDER BY ID; {code}
Expected results: {{{}(1, 'hello'){}}}, {{{}(2, '42'){}}}, {{{}(3, NULL){}}}.

The system view failure became consistently reproducible after IGNITE-29045 
removed a type-cache collision.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to