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 virtual table implementation + generate_series() demo extension #746

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jussisaurio
Copy link
Collaborator

@jussisaurio jussisaurio commented Jan 19, 2025

TODO:

  • heavy documentation of approach, esp. things where it diverges from sqlite / is hacky / is shit
  • fix generate_series() implementation edge cases

Feats:

  • adds ability to load virtual table modules from extensions
  • adds generate_series() as a demo implementation:
Limbo v0.0.13
Enter ".help" for usage hints.
limbo> .load target/debug/liblimbo_series.dylib
limbo> select u.id, u.first_name from users u join generate_series(1, 9, 2) g ON u.id = g.value;
1|Jamie
3|Tommy
5|Edward
7|Aimee
9|Matthew

generate_series() is sort of a bad example because it is a so-called "eponymous virtual table" i.e. you don't construct it like CREATE VIRTUAL TABLE generate_series USING series(foo) but it is always loaded into the schema when the module is loaded.

i will try to implement another demo impl that actually uses CREATE VIRTUAL TABLE ... , although that might bloat the PR. but it would also validate the direction the current FFI interface is going in.

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.

1 participant