Files
datastore/programs/server/user_defined_executable_function_drivers
Alexey Milovidov a628621130 Optimize C-body UDF example wrapper IO
Replace the generated wrapper's `stdio`-based `RowBinary` IO with a small
buffered `read` and `write` layer. Parse the text `send_chunk_header` row count
manually and serialize primitive values by copying fixed-width `RowBinary`
values directly to and from the in-memory buffers.

This keeps the example protocol-compatible while avoiding per-value C library
IO and formatting overhead in the generated executable.

Tests:
- generated-wrapper protocol check with one 3-row chunk
- generated-wrapper benchmark: 200000 rows, about 25M rows/sec in this run
- `CLICKHOUSE_BINARY=./build/programs/clickhouse tests/queries/0_stateless/04241_executable_udf_driver.sh`
- `CLICKHOUSE_BINARY=./build/programs/clickhouse tests/queries/0_stateless/04242_executable_udf_driver_errors.sh`

Refs: https://github.com/ClickHouse/ClickHouse/pull/105131
2026-05-16 22:35:58 +02:00
..