Angelo Kastroulis created FLINK-29575:
-----------------------------------------
Summary: Can't Add Temporary Function USING JAR
Key: FLINK-29575
URL: https://issues.apache.org/jira/browse/FLINK-29575
Project: Flink
Issue Type: Bug
Components: Documentation
Affects Versions: 1.15.1
Reporter: Angelo Kastroulis
In the create documentation for Flink SQL it says:
{code:java}
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']* ] {code}
However, this:
{code:java}
CREATE TEMPORARY SYSTEM FUNCTION MyFunc AS
'com.ballista.my.classpath.MyFunc' LANGUAGE SCALA
USING JAR 'path-to-my.jar'{code}
Throws this exception:
{code:java}
[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>
";" ... {code}
This works:
{code:java}
ADD JAR 'path-to-my.jar';
CREATE TEMPORARY SYSTEM FUNCTION MyFunc AS
com.ballista.my.classpath.MyFunc' LANGUAGE SCALA;{code}
Is this a bug in the code, or is the documentation perhaps not up to date?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)