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 2021/01/15 06:38:00 UTC
[jira] [Closed] (FLINK-20984) can not convert an array into Table
[ https://issues.apache.org/jira/browse/FLINK-20984?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jark Wu closed FLINK-20984.
---------------------------
Resolution: Not A Problem
> can not convert an array into Table
> -----------------------------------
>
> Key: FLINK-20984
> URL: https://issues.apache.org/jira/browse/FLINK-20984
> Project: Flink
> Issue Type: Improvement
> Components: Table SQL / API
> Affects Versions: 1.12.0
> Environment: flink version: 1.12.0
> Reporter: Spongebob
> Priority: Major
>
> {code:java}
> //代码占位符
> val data = List(row("a", "b", "c"), row("d", "e", "f"))
> val table = tableEnv.fromValues(data)
> {code}
> This result table's schema is unexpected, actually the shema is :
> root
> |– f0: ARRAY<ROW<`f0` CHAR(1) NOT NULL, `f1` CHAR(1) NOT NULL, `f2` CHAR(1) NOT NULL> NOT NULL> NOT NULL|
> , I had found that example code's method is like this:
> {code:java}
> //代码占位符
> tEnv.fromValues(
> row(1, "ABC"),
> row(2L, "ABCDE")
> )
> {code}
> But how could I send all rows into the fromValues function from Array object ?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)