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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to