[jira] [Created] (FLINK-20984) can not convert an array into Table

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

[jira] [Created] (FLINK-20984) can not convert an array into Table

Shang Yuanchun (Jira)
Spongebob created FLINK-20984:
---------------------------------

             Summary: 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


{code:java}
//代码占位符
val data = List(row("a", "b", "c"), row("d", "e", "f"))

val table = tableEnv.fromValues(dataTypes,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)