You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/06/06 08:40:11 UTC
[GitHub] [incubator-doris] stdpain opened a new issue #5977: [Feature][UDF] support LUA UDF
stdpain opened a new issue #5977:
URL: https://github.com/apache/incubator-doris/issues/5977
1. create a lua function
```sql
-- create udf function int (int,int)
CREATE FUNCTION lua_add(int,int)
RETURNS int
properties
(
"type"="LUA",
"symbol" = "LUA_ADD",
"object_file" = "http://127.0.0.1:8097/ans.lua"
);
-- create udf function string (string,string)
CREATE FUNCTION lua_cat(varchar(50),varchar(50))
RETURNS varchar(50)
properties
(
"type"="LUA",
"symbol" = "LUA_STRCAT",
"object_file" = "http://127.0.0.1:8097/ans2.lua"
);
```
ans.lua:
```lua
function LUA_ADD(a, b)
return a+b;
end
return 1
```
ans2.lua
```lua
function LUA_STRCAT(a,b)
return string.format("%s %s",a,b);
end
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] stdpain closed issue #5977: [Feature][UDF] support LUA UDF
Posted by GitBox <gi...@apache.org>.
stdpain closed issue #5977:
URL: https://github.com/apache/incubator-doris/issues/5977
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org