rbc icon indicating copy to clipboard operation
rbc copied to clipboard

Defining UDF/UDTFs from file or text using SQL DEFINE.

Open pearu opened this issue 4 years ago • 0 comments

Some ideas from Slack discussion https://quansight.slack.com/archives/C01CAU0U1FH/p1605529329121500:

DEFINE UDTF dbscan FROM '/path/to/dbscan.cpp' WITH (mode='cpu', source='file');
DEFINE UDTF dbscan FROM 'int32 dbscan__cpu_0(Column<double> x, ...) { ... }' WITH (lang='c++', source='text');

where lang can be c++, python, etc.

Note that a single .cpp/.py file may contain several UDF/UDTF definitions.

pearu avatar Nov 17 '20 10:11 pearu