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

Support (*) as parameter of table UserDefinedFunction

    XMLWordPrintableJSON

Details

    Description

      For now, one can use star (*) to act as a wild card, selecting all of the columns in the table.

      Table result = orders.select($("*"));
      

      When one use a star (*) as parameter of an UDF, it will fail ReferenceResolverRule in on

      "Cannot resolve field [*], input field list:[...]."
      

      The cause is that, the parameter of an UDF is not expanded in StarReferenceFlatteningRule

      I think we can support to expand the star parameter to the real fields list if it is the only parameter(the last parameter is also ok) of the UDF.

      then the parameters can be received by

      eval(@DataTypeHint(inputGroup = InputGroup.ANY) Object... row)
      

      Attachments

        Issue Links

          Activity

            People

              yittg Yi Tang
              yittg Yi Tang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: