DATABASES Signal 299
Chunked Query Results in the DuckDB Java Driver
The DuckDB Java driver now offers a lazy, column-wise chunked result API that lets applications read query output in native engine chunks instead of JDBC’s row-by-row ResultSet.
By avoiding the per-value conversion and row assembly required by JDBC, the chunked API reduces CPU overhead when processing large result sets. Engineers who control both sides of the data pipeline can now stream columnar data directly into Arrow buffers, feature matrices, or custom storage without the extra copy-step.
Written by elseif from the cluster below · every claim links back to a sourceThe three things worth knowing
The API exposes DuckDB’s internal chunk stream via DuckDBChunkedResult, delivering batches of up to 2,048 rows as column vectors.
Reading a chunk requires calling nextChunk(), then accessing vectors by index and iterating rows with type-specific getters.
The chunked path is intended for large queries where the application can replace JDBC’s ResultSet loop; for small result sets the traditional path remains preferable.
THE CLUSTER