Hi,

1.     Can USING clause be optional, which is compatible with older versions? 
Without using this clause means that IoTDB will search the class in the default 
ext/udf directory.

2.     The ‘jarLocation’defined in .g4 file is as follow:

USING ((FILE fileName=STRING_LITERAL) | URI uri)

I think it can be unified by ‘USING uri=uri’, and your example will be

create function TEST as 'org.apache.iotdb.udf.example.Test' using 
'file:///Users/xxx/Desktop/Test.jar'

As the file absolute path can be considered to a kind of URI.

发件人: 廖兰宇 <[email protected]>
日期: 星期三, 2022年10月26日 16:29
收件人: dev <[email protected]>
主题: Changes on grammar of CREATE FUNCTION
Hi everybody,

In previous version, we need DBA to put JAR in specified direcotry manually 
before using CREATE FUNCTION grammar to create a UDF. We think its better to 
specify the file path of the JAR and let the cluster to transfer the JAR file, 
so we changed the grammar of the CREATE FUNCTION.

For example, to create a UDF named TEST using a JAR file on your desktop, you 
may use the following SQL:

create function TEST as 'org.apache.iotdb.udf.example.Test' using FILE 
'/Users/xxx/Desktop/Test.jar'

Any comments would be much appreciated.

Best,

------------------------------------

Lanyu Liao

School of Software, Tsinghua University

廖兰宇

清华大学 软件学院

Reply via email to