The object_file property of the function must be a URL like "http://host:port/libmyStrConcat.so".
You can enter 'help create function' to Doris and see the example of udf. Ling Miao 吟游诗人 <751937...@qq.com> 于2021年7月29日周四 下午2:03写道: > Hi! > Thanks for your replay. > I have fixed yesterday's error, but another happens,follows are my sql and > the error, please help to look at why this error happens, thanks. > mysql> CREATE FUNCTION dwd_smart_community.sm4Decry (VARCHAR(256)) > RETURNS VARCHAR(256) PROPERTIES ( > -> "symbol" = > "_ZN9doris_udf10sm4DecryptEPNS_15FunctionContextERKNS_9StringValE", > -> "object_file" = > "/opt/doris/incubator-doris/udf/udf_decry/libudfsm4.so" > -> ); > ERROR 1064 (HY000): errCode = 2, detailMessage = cannot to compute > object's checksum > > Thanks, > look forward to your response > > > > ------------------ 原始邮件 ------------------ > *发件人:* "ling miao" <emmymia...@gmail.com>; > *发送时间:* 2021年7月28日(星期三) 下午4:15 > *收件人:* "吟游诗人"<751937...@qq.com>; > *主题:* Fwd: Doris UDF > > + 751937...@qq.com > > ---------- Forwarded message --------- > 发件人: ling miao <emmymia...@gmail.com> > Date: 2021年7月28日周三 下午4:14 > Subject: Re: Doris UDF > To: dev <dev@doris.apache.org>, <751937...@qq.com.invalid> > > > The varchar type needs to have a length, or * > > ``` > CREATE FUNCTION dwd_smart_community.sm4Decry (VARCHAR(*)) RETURNS > VARCHAR(*) xxxx > ``` > > Ling Miao > > 吟游诗人 <751937...@qq.com.invalid> 于2021年7月28日周三 下午4:05写道: > >> Hi! >> This error I have fixed, but another occurs:ERROR 1064(HY000):errCode = >> 2,detailMessage = Varchar Size must be >0 :-1 >> I don't know what it means. >> >> >> Thanks, >> look forward to your response >> >> >> >> ------------------ 原始邮件 ------------------ >> 发件人: >> "吟游诗人" >> < >> 751937...@qq.com>; >> 发送时间: 2021年7月28日(星期三) 中午11:33 >> 收件人: "dev"<dev@doris.apache.org>; >> >> 主题: Doris UDF >> >> >> >> Hi! >> I have one question about Doris UDF. >> Now,I have prepared one file named libudfsm4.so and I want to >> create UDF. >> Follows are my sql, but error happens:ERROR 1064 (HY000): errCode = 2, >> detailMessage = Please check your sql, we meet an error when parsing. >> I don't know what this error means and how to fix it. >> My steps are: >> Step one:I put libudfsm4.so in /opt/doris/incubator-doris/udf_decry/ and >> send >> nm libudfsm4.so | grep udf >> to get symbol.I don't know what I have done is right or not. >> Step two:I don't know how to put libudfsm4.so to someplace where >> http/https can reach so I let object_file equals local uri,I don't know >> this is right or not. >> Thanks, >> look forward to your response >> CREATE FUNCTION dwd_smart_community.sm4Decry (VARCHAR) RETURNS VARCHAR >> PROPERTIES ( >> "symbol" = >> "_ZN9doris_udf10sm4DecryptEPNS_15FunctionContextERKNS_9StringValE", >> "object_file" = >> "/opt/doris/incubator-doris/udf/udf_decry/libudfsm4.so" >> ); > >