[jira] [Created] (FLINK-13463) SQL VALUES might fail for Blink planner

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-13463) SQL VALUES might fail for Blink planner

Shang Yuanchun (Jira)
Timo Walther created FLINK-13463:
------------------------------------

             Summary: SQL VALUES might fail for Blink planner
                 Key: FLINK-13463
                 URL: https://issues.apache.org/jira/browse/FLINK-13463
             Project: Flink
          Issue Type: Bug
          Components: Table SQL / Planner
            Reporter: Timo Walther
            Assignee: Timo Walther


Executing the following statement in SQL Client of FLINK-13458:
{code}
SELECT name, COUNT(*) AS cnt FROM (VALUES ('Bob'), ('Alice'), ('Greg'), ('Bob')) AS NameTable(name) GROUP BY name;
{code}

Leads to:
{code}
Exception in thread "main" org.apache.flink.table.client.SqlClientException: Unexpected exception. This is a bug. Please consider filing an issue.
        at org.apache.flink.table.client.SqlClient.main(SqlClient.java:206)
Caused by: org.apache.flink.table.api.TableException: Unsupported conversion from data type 'VARCHAR(5) NOT NULL' (conversion class: java.lang.String) to type information. Only data types that originated from type information fully support a reverse conversion.
        at org.apache.flink.table.types.utils.LegacyTypeInfoDataTypeConverter.toLegacyTypeInfo(LegacyTypeInfoDataTypeConverter.java:242)
        at org.apache.flink.table.types.utils.TypeConversions.fromDataTypeToLegacyInfo(TypeConversions.java:49)
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:545)
        at java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
        at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:438)
        at org.apache.flink.table.types.utils.TypeConversions.fromDataTypeToLegacyInfo(TypeConversions.java:55)
        at org.apache.flink.table.api.TableSchema.getFieldTypes(TableSchema.java:129)
        at org.apache.flink.table.client.gateway.local.LocalExecutor.removeTimeAttributes(LocalExecutor.java:609)
        at org.apache.flink.table.client.gateway.local.LocalExecutor.executeQueryInternal(LocalExecutor.java:465)
        at org.apache.flink.table.client.gateway.local.LocalExecutor.executeQuery(LocalExecutor.java:316)
        at org.apache.flink.table.client.cli.CliClient.callSelect(CliClient.java:469)
        at org.apache.flink.table.client.cli.CliClient.callCommand(CliClient.java:291)
        at java.util.Optional.ifPresent(Optional.java:159)
        at org.apache.flink.table.client.cli.CliClient.open(CliClient.java:200)
        at org.apache.flink.table.client.SqlClient.openCli(SqlClient.java:123)
        at org.apache.flink.table.client.SqlClient.start(SqlClient.java:105)
        at org.apache.flink.table.client.SqlClient.main(SqlClient.java:194)
{code}

A solution needs some investigation.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)