Code Monkey home page Code Monkey logo

duckdb.mojo's Introduction

Experimental Mojo🔥 DuckDB Client

This internally uses the DuckDB C API and currently has some FFI/ABI issues.

Specific things failing:

  1. Loading Pointer[struct] (and AnyPointer[struct]) value into Mojo, where the struct instance is assigned on the C side. Only basic fields are needed (int and void pointers).
    Current behavior: After load or take_value (Mojo side), only some int fields will have correct value, but if a shallow copy of the pointer to the struct (as in __moveinit__) is done before load/take_value, then all int fields will have correct values 🤷‍♂️
  2. Pass simple structs by value to C functions. (currently results in either SIGBUS or SIGSEGV)

Setup

Future Plans

Any one of:

  • Figure out this is actually somehow currently possible in Mojo
  • Wait for Modular to document/further implement FFI and AnyPointer
  • Wait (probably a long time?) for C++ Module interop. This would be cool since DuckDB is written in C++ (C API is a wrapper).
  • Write custom C functions (as replacement for some current C API functions) so we can pass all arguments as void pointers

Then:

  1. Finish MVP/POC code for reading columnar chunks/vectors from DuckDB to Mojo.
  2. Implement prepared statements, 'appender' API, support Mojo parallelism as alterative to DuckDB CPP thread pool.

duckdb.mojo's People

Contributors

djkelleher avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.