Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-9484 Improve generic type inference for User-Defined Functions
  3. FLINK-9501

Allow Object or Wildcard type in user-define functions as parameter types but not result types

Attach filesAttach ScreenshotVotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • Table SQL / API

    Description

      Idea here is to treat every Java parameter objects type as SQL ANY type. While disallowing SQL ANY type in result object.
      This ticket is specifically to deal with composite types (with nested schema or sub schema) such as generic erasure types

      public String eval(Map<String, ?> mapArg) { /* ...  */ }
      public String eval(Map<String, Object> mapArg) { /* ...  */ }
      public String eval(Row rowArg) { /* ...  */ }
      

      Update 08/2018
      With FLINK-9294 covering some of the generic type erasure. The additional changes needed are:
      1. Modify FunctionCatalog lookup to use SQL ANY type when a higher level type matching is not viable.
      2. Introduce additional FunctionCatalog lookup checks to ensure that additional informations provided by type inference is used for validation purpose.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            rongr Rong Rong
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment