duckdb / duckdb-web

DuckDB website and documentation
https://duckdb.org
MIT License
160 stars 300 forks source link

Issue found on page 'C API' #3357

Open tdunning opened 1 month ago

tdunning commented 1 month ago

Please describe the problem you encountered in the DuckDB documentation and include the "Page URL" link shown below. Note: only create an issue if you wish to report a problem with the DuckDB documentation. For questions about DuckDB or the use of certain DuckDB features, use GitHub Discussions, Stack Overflow, or Discord.

Page URL: https://duckdb.org/docs/api/cpp.html

I think that the OrrifiedVector nomenclature has been removed from the code.

Tishj commented 1 month ago

Yea that's true, it's been replaced by UnifiedVectorFormat and Vector::ToUnifiedFormat(idx_t size, UnifiedVectorFormat &output)

tdunning commented 1 month ago

How does a doc page get updated?

There are other problems with these examples as well and the codebase is essentially undocumented. The sample extension is nice, but it only deals with the very simplest of cases (primitive types, scalar function). I have a need to deal with structs and lists as arguments and return types and it is very slow going trying to figure out what will work. Lots of trial and error.

Tishj commented 1 month ago

You're welcome to contribute to the docs, as you've found this part of the docs is very old and hasn't been touched in a while

tdunning commented 1 month ago

That's nice in theory, but what the docs need is what I need to learn about. I can't very well contribute unless I know what's going on.

So far, the only thing that I can contribute is that I can't use this part of the documentation to achieve the goal of building more than a trivial extension. Period. That is definitely a contribution (naive eyes are always valuable and fleeting). But it only highlights the problem. It can't solve it.

szarnyasg commented 1 month ago

Hi @tdunning, thanks for the feedback. I understand the frustration – this part of the documentation is lacking several important pieces of information. We plan to improve it in the future but it will take time as there are several other key issues (see the issue tracker of the repository) that need to be tackled.

For now, I recommend studying what other extensions (including the core DuckDB extensions and the community extensions) are doing. You are also welcome to join the #community-extensions channel on Discord.