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

Can't Add Temporary Function USING JAR

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • 1.15.1
    • None
    • Documentation
    • None

    Description

      In the create documentation for Flink SQL it says:

      CREATE [TEMPORARY|TEMPORARY SYSTEM] FUNCTION 
        [IF NOT EXISTS] [catalog_name.][db_name.]function_name 
        AS identifier [LANGUAGE JAVA|SCALA|PYTHON] 
        [USING JAR '<path_to_filename>.jar' [, JAR '<path_to_filename>.jar']* ] 

      However, this:

      CREATE TEMPORARY SYSTEM FUNCTION MyFunc AS
          'com.ballista.my.classpath.MyFunc' LANGUAGE SCALA 
      USING JAR 'path-to-my.jar'

      Throws this exception:

      [ERROR] Could not execute SQL statement. Reason:
      org.apache.flink.sql.parser.impl.ParseException: Encountered "USING" at line 3, column 3.
      Was expecting one of:
          <EOF> 
          ";" ... 

      This works:

      ADD JAR 'path-to-my.jar'; 
      CREATE TEMPORARY SYSTEM FUNCTION MyFunc AS        com.ballista.my.classpath.MyFunc' LANGUAGE SCALA;

      Is this a bug in the code, or is the documentation perhaps not up to date?

      Attachments

        Activity

          People

            Unassigned Unassigned
            angelok Angelo Kastroulis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: