Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-20984

can not convert an array into Table

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Reopened
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.12.0
    • Fix Version/s: None
    • Component/s: Table SQL / API
    • Labels:
      None
    • Environment:

      flink version:  1.12.0

      Description

      //代码占位符
      val data = List(row("a", "b", "c"), row("d", "e", "f"))
      
      val table = tableEnv.fromValues(data)
      

      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:

      //代码占位符
      tEnv.fromValues(
            row(1, "ABC"),
            row(2L, "ABCDE")
        )
      

      But how could I send all rows into the fromValues function from Array object ?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              SpongebobZ Spongebob
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: