描述
列
name(String) — UDF 名称。load_status(Enum8(‘Success’ = 0, ‘Failed’ = 1)) — 加载状态。可能的值:Success — UDF 已加载,可供使用;Failed — UDF 加载失败 (详见 ‘loading_error_message’ 字段) 。loading_error_message(String) — 加载失败时的详细错误消息。加载成功时为空。last_successful_update_time(Nullable(DateTime)) — 最近一次成功更新的时间戳。从未成功更新则为 NULL。loading_duration_ms(UInt64) — 加载 UDF 所用时间,单位为毫秒。type(Enum8(‘executable’ = 0, ‘executable_pool’ = 1)) — UDF 类型:‘executable’ (单进程) 或 ‘executable_pool’ (进程池) 。command(String) — 此 UDF 要执行的脚本或命令。format(String) — I/O 数据格式 (例如 ‘TabSeparated’、‘JSONEachRow’) 。return_type(String) — 函数返回类型 (例如 ‘String’、‘UInt64’) 。return_name(String) — 可选的返回值标识符。未配置时为空。argument_types(Array(String)) — 参数类型数组 (例如 [‘String’、‘UInt64’]) 。argument_names(Array(String)) — 参数名称数组。未命名参数对应空字符串。max_command_execution_time(UInt64) — 处理一个数据块的最长时间,单位为秒。仅适用于 ‘executable_pool’ 类型。command_termination_timeout(UInt64) — 向命令进程发送 SIGTERM 前的等待时间,单位为秒。command_read_timeout(UInt64) — 从命令 stdout 读取数据的超时时间,单位为毫秒。command_write_timeout(UInt64) — 向命令 stdin 写入数据的超时时间,单位为毫秒。pool_size(UInt64) — 命令进程实例数。仅适用于 ‘executable_pool’ 类型。send_chunk_header(UInt8) — 是否在每个数据块前发送行数 (布尔值) 。execute_direct(UInt8) — 是否直接执行命令 (1) ,而不通过 /bin/bash 执行 (0) 。lifetime(UInt64) — 重新加载间隔,单位为秒。0 表示禁用重新加载。deterministic(UInt8) — 函数对相同参数是否始终返回相同结果 (布尔值) 。
示例
另请参阅
- 用户自定义函数 — 如何创建和配置 UDF。