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

Use Project to rename all record fields would fail following Project.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • Table SQL / API
    • None

    Description

       val t = CollectionDataSets.get3TupleDataSet(env).toTable
            .select('_1 as 'a, '_2 as 'b, '_3 as 'c)
            .select('a, 'b)
      

      would throw exception like:

      java.lang.IllegalArgumentException: field [a] not found; input fields are: [_1, _2, _3]
      	at org.apache.calcite.tools.RelBuilder.field(RelBuilder.java:290)
      	at org.apache.calcite.tools.RelBuilder.field(RelBuilder.java:275)
      	at org.apache.flink.api.table.plan.RexNodeTranslator$.toRexNode(RexNodeTranslator.scala:80)
      	at org.apache.flink.api.table.Table$$anonfun$5.apply(table.scala:98)
      	at org.apache.flink.api.table.Table$$anonfun$5.apply(table.scala:98) 

      new alias names are lost.

      Attachments

        Issue Links

          Activity

            People

              fhueske Fabian Hueske
              chengxiang li Chengxiang Li
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: