You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Jark Wu (Jira)" <ji...@apache.org> on 2020/02/11 04:06:00 UTC

[jira] [Resolved] (FLINK-15546) Obscure error message from ScalarOperatorGens::generateCast

     [ https://issues.apache.org/jira/browse/FLINK-15546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jark Wu resolved FLINK-15546.
-----------------------------
    Fix Version/s: 1.11.0
       Resolution: Fixed

Fixed in 1.11.0 (master): 5614f2160c7756b78b37e66ef8a543c2c48550bd

> Obscure error message from ScalarOperatorGens::generateCast
> -----------------------------------------------------------
>
>                 Key: FLINK-15546
>                 URL: https://issues.apache.org/jira/browse/FLINK-15546
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table SQL / API
>            Reporter: Rui Li
>            Assignee: Zhenghua Gao
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.11.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Consider the following case:
> {noformat}
> Flink SQL> describe foo;
> root
>  |-- x: ROW<`f1` DOUBLE, `f2` VARCHAR(10)>
> Flink SQL> insert into foo select row(1.1,'abc');
> [INFO] Submitting SQL update statement to the cluster...
> [ERROR] Could not execute SQL statement. Reason:
> org.apache.flink.table.planner.codegen.CodeGenException: Unsupported cast from 'ROW' to 'ROW'.
> {noformat}
> Users are unlikely to figure out what goes wrong from the above error message. Something like {{Unsupported cast from 'ROW<DECIMAL(2,1), CHAR(3)>' to 'ROW<DOUBLE, VARCHAR(10)>'}} will be more helpful.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)