Hi all,

I have created an experimental DuckDB extension to query Apache TsFile
table-model files directly:


https://github.com/ColinLeeo/tsfile-duckdb


The extension exposes a table function such as:


SELECT time, timeseries_id, value
FROM read_tsfile('/data/measurements.tsfile', 'greend_1')
WHERE time BETWEEN 100000 AND 200000;


The current implementation includes:


1. Integration of the TsFile C++ reader with DuckDB's table function API.
2. Static builds of TsFile and its compression dependencies.
3. TsFile-to-DuckDB type mapping and streaming result batches.
4. Projection pushdown and time predicate pushdown.
5. Build verification on Linux, macOS, and Windows through DuckDB Community
   Extensions CI.


The DuckDB Community Extensions PR is available here:


https://github.com/duckdb/community-extensions/pull/2435


Based on this initial implementation and validation, I would like to discuss
bringing this work into a repository under the Apache TsFile organization.
The current repository is still hosted under my personal GitHub account:


https://github.com/ColinLeeo/tsfile-duckdb


If the community agrees with this direction, we can move the DuckDB extension
to an Apache-owned repository in a future step.


The current prototype supports one local TsFile and one table per query.
Directory scans, automatic table discovery, multi-file scans, and
DuckDB-WASM support are not included yet.


Reviews and suggestions are welcome.


Best regards,


Colin Lee

Reply via email to