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

Add functions to substrait extension #1

Draft
wants to merge 26 commits into
base: main
Choose a base branch
from
Draft

Add functions to substrait extension #1

wants to merge 26 commits into from

Commits on Mar 23, 2024

  1. Copy the full SHA
    05a5363 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    bfffd8d View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    be6ee3f View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    f7e17d9 View commit details
    Browse the repository at this point in the history
  5. task: reorganized substrait code

    This reorganization is partially for my own benefit (readability and
    internalizing the structure), though I did add some improvements such as
    how substrait types are used in switch statements.
    
    The other motivation for this reorganization is so that I can have a
    better overall structure/framework for also "translating" a substrait
    plan to a logical duckdb plan (instead of only a physical duckdb plan).
    
    In this code, I use "translation" to refer to a _lowering_ from a
    logical substrait plan to a physical duckdb plan.
    drin committed Mar 23, 2024
    Copy the full SHA
    62c207f View commit details
    Browse the repository at this point in the history
  6. task: added code for transpilation of substrait

    In this code, which is an initial placeholder, I use "transpilation" to
    refer to a translation (general sense of the word) from a logical
    substrait plan to a logical duckdb plan. Thus, going forward I will be
    using "translation" to refer to a lowering (e.g. logical to physical)
    and "transpilation" to refer to a transformation to another language
    (dialect?) of the same level (e.g. logical to logical).
    drin committed Mar 23, 2024
    Copy the full SHA
    31210d6 View commit details
    Browse the repository at this point in the history
  7. task: updated CMakeLists.txt to build new sources

    This worked with the updated code for translation, but I have not yet
    begun to work on code for transpilation, so this is certain to not work
    at the moment (though, deleting everything transpilation related should
    get it to work).
    drin committed Mar 23, 2024
    Copy the full SHA
    c022dc5 View commit details
    Browse the repository at this point in the history
  8. minor: mysterious style changes

    NOTE: these sources can potentially be dropped
    drin committed Mar 23, 2024
    Copy the full SHA
    e141f4c View commit details
    Browse the repository at this point in the history
  9. task: added methods to DuckDBEnginePlan

    NOTE: these can potentially be dropped in the future now that there's a
    clear transformation path from duckdb::Relation to
    duckdb::LogicalOperator
    drin committed Mar 23, 2024
    Copy the full SHA
    0b2aa67 View commit details
    Browse the repository at this point in the history
  10. task: updates to TranspilePlanMessage

    updated some types and changed TranspilePlanMessage to call
    TranslateMessage then transform duckdb::Relation into
    duckdb::LogicalOperator.
    
    This makes the layers of abstraction I expected
    ("translation", "transpilation") basically wrong, but I will update that
    when I get more clarity on it.
    drin committed Mar 23, 2024
    Copy the full SHA
    d1b5b00 View commit details
    Browse the repository at this point in the history
  11. task: updated binding for "transpile_mohair"

    I still have to figure out how to execute a physical plan, but otherwise
    I have updated to convert from duckdb::Relation to
    duckdb::LogicalOperator, optimize duckdb::LogicalOperator, then create a
    physical plan (duckdb::PhysicalOperator) from a logical plan
    (duckdb::LogicalOperator).
    
    Most of the above is to be sure that I'm correctly doing the
    transformations, etc. and they will be migrated once I better figure out
    the various interfaces to extensions (rather than just a TableFunction).
    drin committed Mar 23, 2024
    Copy the full SHA
    7582f9a View commit details
    Browse the repository at this point in the history
  12. task: dropped transpile sources from build

    Since they aren't necessary at the moment
    drin committed Mar 23, 2024
    Copy the full SHA
    3d03e5c View commit details
    Browse the repository at this point in the history
  13. Copy the full SHA
    a64b4f9 View commit details
    Browse the repository at this point in the history
  14. task: Removed unnecessary code

    Now that the transpilation path goes from Relation -> LogicalOperator,
    the transpilation functions are unnecessary.
    drin committed Mar 23, 2024
    Copy the full SHA
    dac982a View commit details
    Browse the repository at this point in the history
  15. task: removed unused function

    This unused function caused linking issues, and it won't be needed in
    the future
    drin committed Mar 23, 2024
    Copy the full SHA
    1d0e8a1 View commit details
    Browse the repository at this point in the history
  16. task: updated transpilation and execution

    While transpilation (via transforming Relation -> LogicalOperator) was
    straightforward, it was necessary to figure out how execution of the
    logical plan is done. These changes include optimization of the logical
    plan, transformation from logical to physical, and execution of the
    physical plan.
    drin committed Mar 23, 2024
    Copy the full SHA
    53cc483 View commit details
    Browse the repository at this point in the history
  17. minor: updated cmake version to my current

    This probably isn't necessary but I am making it just to make it
    drin committed Mar 23, 2024
    Copy the full SHA
    fc09368 View commit details
    Browse the repository at this point in the history
  18. minor: removed tabs

    drin committed Mar 23, 2024
    Copy the full SHA
    014e730 View commit details
    Browse the repository at this point in the history
  19. minor: removed unused code

    drin committed Mar 23, 2024
    Copy the full SHA
    42f9e3b View commit details
    Browse the repository at this point in the history
  20. Copy the full SHA
    e4bb0fe View commit details
    Browse the repository at this point in the history
  21. task: moved engine specific code to engine_duckdb

    this way, plans.hpp and plans.cpp can provide a structure for
    engine-agnostic hooks (though it doesn't seem very good right now)
    drin committed Mar 23, 2024
    Copy the full SHA
    87c7be9 View commit details
    Browse the repository at this point in the history
  22. task: moved methods into DuckDBTranslator

    this is because EnginePlan has been changed to SystemPlan and engine
    specific code has been removed.
    drin committed Mar 23, 2024
    Copy the full SHA
    5e41f34 View commit details
    Browse the repository at this point in the history
  23. task: updated new TableFunctions

    TableFunctions have been renamed to reflect a better understanding of
    the process. Currently the added functions are "exec_mohair" and
    "translate_mohair" where "mohair" is a reference to substrait plans as a
    cross-engine plan representation
    drin committed Mar 23, 2024
    Copy the full SHA
    772c698 View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2024

  1. task: update duckdb to v0.10.1

    I apparently merged in changes to substrait extension that depend on
    duckdb v0.10.1. Instead of reverting the changes, I decided to update
    duckdb dependency
    drin committed Mar 27, 2024
    Copy the full SHA
    db21341 View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2024

  1. task: updating duckdb dependency

    In my branch of duckdb (coop-decomp) I added an `ExplainSubstrait`
    function for the python API to show the physical plan generated from a
    substrait plan (instead of just a single TableFunction node)
    drin committed Apr 3, 2024
    Copy the full SHA
    02cd80a View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2024

  1. minor: downgraded cmake minimum version

    Debian 20240408-slim seems to have cmake 3.25.1, so I downgraded to that
    version
    drin committed Apr 23, 2024
    Copy the full SHA
    27cadc7 View commit details
    Browse the repository at this point in the history