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
base: main
Are you sure you want to change the base?
Commits on Mar 23, 2024
-
-
-
-
-
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.
-
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).
-
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).
-
minor: mysterious style changes
NOTE: these sources can potentially be dropped
-
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
-
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.
-
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).
-
task: dropped transpile sources from build
Since they aren't necessary at the moment
-
-
task: Removed unnecessary code
Now that the transpilation path goes from Relation -> LogicalOperator, the transpilation functions are unnecessary.
-
This unused function caused linking issues, and it won't be needed in the future
-
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.
-
minor: updated cmake version to my current
This probably isn't necessary but I am making it just to make it
-
-
-
-
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)
-
task: moved methods into DuckDBTranslator
this is because EnginePlan has been changed to SystemPlan and engine specific code has been removed.
-
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
Commits on Mar 27, 2024
-
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
Commits on Apr 3, 2024
-
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)
Commits on Apr 23, 2024
-
minor: downgraded cmake minimum version
Debian 20240408-slim seems to have cmake 3.25.1, so I downgraded to that version