chdb-io / chdb

chDB is an in-process OLAP SQL Engine 🚀 powered by ClickHouse
https://clickhouse.com/chdb
Apache License 2.0
2.13k stars 75 forks source link

Populate global UDF settings ClickHouse PR #52643 #81

Closed lmangani closed 1 year ago

lmangani commented 1 year ago

Backport changes from ClickHouse PR #52643 to support additional UDF settings.

Changelog category (leave one):

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Populate global UDF settings

Technical Notes

Bash example with local counterpart syntax:

chdb

TBD

clickhouse-local

Configure path

SCRIPTS_DIR=$CUR_DIR/scripts_udf
$CLICKHOUSE_LOCAL -q 'select test_function()' -- --user_scripts_path=$SCRIPTS_DIR --user_defined_executable_functions_config=$SCRIPTS_DIR/function.xml

Invoke UDF function from path

SELECT * FROM executable('some_script.py', TabSeparated, 'name String', (SELECT name));