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

Cannot alias Tuple and Row fields when converting DataStream to Table

    XMLWordPrintableJSON

Details

    Description

      It is impossible to alias Tuple and Row fields when converting DataStream to Table.

      tableEnv.fromDataStream(env.fromElements(Tuple2.of("a", 1)), "f0 as name, f1 as age");
      

      This leads to the following error:

      Alias 'name' is not allowed if other fields are referenced by position

      org.apache.flink.table.typeutils.FieldInfoUtils#isReferenceByPosition method

      More info: https://lists.apache.org/thread.html/re35f37797692af4e9e0e2512dedf0f598e0cdbe1ac4820103d4273c1%40%3Cuser.flink.apache.org%3E

      Attachments

        Activity

          People

            leonard Leonard Xu
            gyfora Gyula Fora
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: