databend
databend copied to clipboard
feat: update supports external udf
Summary
CREATE OR REPLACE FUNCTION bendml_embed_text_768 (STRING)
RETURNS ARRAY(FLOAT)
LANGUAGE python
HANDLER = 'bendml_embed_text_768'
ADDRESS = 'https://api.bendml.com';
create or replace table doc(id INT, text STRING, embedding ARRAY(FLOAT) NULL);
insert into doc(id, text) values(1, 'ไปๅคฉๅคฉๆฐๆไนๆ ท?'),(2, 'How is the weather today?');
update doc set embedding = bendml_embed_text_768(text) where embedding is NULL;
Error:
1065=>error:
--> SQL:2:28
|
1 |
2 | update doc set embedding = bendml_embed_text_768(text) where embedding is NULL;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ update_list in update statement can't contain subquery|window|aggregate|udf functions|async functions
@zhyass Can we support udf functions in update? I suspect this isn't the same as subquery|windowsother cases.