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

Add implicitly converts support for User-defined function

    XMLWordPrintableJSON

Details

    Description

      Currently if user defined a UDF as follows:

      object Func extends ScalarFunction {
        def eval(a: Int, b: Long): String = {
          ...
        }
      }
      

      And if the table schema is (a: Int, b: int, c: String), then we can not call the UDF `Func('a, 'b)`. So
      I want add implicitly converts when we call UDF. The implicitly convert rule is:

      BYTE_TYPE_INFO -> SHORT_TYPE_INFO -> INT_TYPE_INFO -> LONG_TYPE_INFO -> FLOAT_TYPE_INFO -> DOUBLE_TYPE_INFO

      *Note:
      In this JIRA. only for TableAPI, And SQL will be fixed in https://issues.apache.org/jira/browse/CALCITE-1908.*

      What do you think? fhueske

      Attachments

        Activity

          People

            sunjincheng121 sunjincheng
            sunjincheng121 sunjincheng
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 10m
                10m