Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Initial support of table function #112

Closed
wants to merge 6 commits into from
Closed

Conversation

wangfenjin
Copy link
Collaborator

@wangfenjin wangfenjin commented Dec 19, 2022

This is based on @Mause 's https://github.com/Mause/duckdb-extension-framework

It works (refer test_table_function), but I'm thinking about design a more safe and high level API, similiar to rusqlite vtab, So need more time to merge the MR

If anyone interested to work on this base on this version can let me know

related to #102 #79

Change-Id: Iee9e36ce944390ea7477316f3576adcd7118cf54
@wangfenjin wangfenjin marked this pull request as draft December 19, 2022 05:47
@wangfenjin
Copy link
Collaborator Author

wangfenjin commented Dec 19, 2022

CI failed because of documentation

Some notes about next steps:

  1. value and related API are don't directly related to table function, but will be used if user want to implement a table function, because user need these API to generate the result set. So we need to make these class of API easy to use
  2. table-functions and related API are used for register the table function, we should design the API simliar to Module and VTab, to make it easy for user to define the table function as normal rust code, with less unsafe code.
  3. We can implement an arrow_scan() table function as an show case and also to verify our API design is good enough

@changhiskhan
Copy link

@wangfenjin we're working on a rust implementation of lance data format and would be interested in seeing if your PR here can provide an easy way for us to write a Lance Scanner (comes out as Arrow) + replacement scan function (so basically item 3 in your next steps). Are you planning to substantially change the API here?

changhiskhan and others added 3 commits January 18, 2023 19:58
Change-Id: I123228378fd7747b9fc4dee3993bed3b11cd553b
Change-Id: I0fa1758d9e2a40b0daaf37fc3887998d7d72e534
@codecov
Copy link

codecov bot commented Jan 18, 2023

Codecov Report

Merging #112 (8fddbf7) into main (d4f5c26) will decrease coverage by 1.12%.
The diff coverage is 50.00%.

❗ Current head 8fddbf7 differs from pull request most recent head 16035a8. Consider uploading reports for the commit 16035a8 to get more accurate results

@@            Coverage Diff             @@
##             main     #112      +/-   ##
==========================================
- Coverage   59.47%   58.36%   -1.12%     
==========================================
  Files          26       28       +2     
  Lines        1483     1638     +155     
==========================================
+ Hits          882      956      +74     
- Misses        601      682      +81     
Impacted Files Coverage Δ
src/table_function/function.rs 40.50% <40.50%> (ø)
src/table_function/mod.rs 57.14% <57.14%> (ø)
src/lib.rs 75.78% <66.66%> (-3.56%) ⬇️
src/inner_connection.rs 85.93% <100.00%> (+0.69%) ⬆️
src/row.rs 58.79% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Change-Id: Ic2f0ada2edea4aa2073224bbb8a5a1c0b56a8c81
Change-Id: I77aca28125c255ebfdf97c5a8ef05bae7014b459
@wangfenjin
Copy link
Collaborator Author

in favor of #138

@wangfenjin wangfenjin closed this Mar 17, 2023
@wangfenjin wangfenjin deleted the table-function branch March 21, 2023 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants