Skip to content

Commit fc61df0

Browse files
feat: full e2e pipeline (#26)
## Problem With the initial representation and storage added in #4 and #22, we now want to support the full pipeline going from parsing SQL, optimizing the plan using optd, and executing the query in Datafusion. ## Summary of changes - Integrate all @SarveshOO7's good work in #10 - Added one mock physical implementation rule + operator for each logical operator - Refactor scalar operator storage and reduce code bloat. - Add physical storage tables and memo API. - Bump MSRV to 1.81.0 to be compatible with datafusion 45.0.0: apache/datafusion#14330 --------- Signed-off-by: Yuchen Liang <yuchenl3@andrew.cmu.edu> Co-authored-by: SarveshOO7 <sarveshtandonus@gmail.com>
1 parent 44d26e2 commit fc61df0

File tree

87 files changed

+11169
-1005
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+11169
-1005
lines changed

.github/codecov.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ coverage:
1616
# Test files aren't important for coverage
1717
ignore:
1818
- "tests"
19+
# Vendored datafusion CLI.
20+
- "optd-datafusion-cli"
1921

2022
# Make comments less noisy
2123
comment:

.github/workflows/check.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ jobs:
9999
# https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability
100100
strategy:
101101
matrix:
102-
msrv: ["1.78.0"] # `Cargo.lock` version 4
102+
# `Cargo.lock` version 4 requires 1.78.0
103+
# datafusion 45.0.0 requires 1.81.0
104+
msrv: ["1.81.0"]
103105
name: ubuntu / ${{ matrix.msrv }}
104106
steps:
105107
- uses: actions/checkout@v4

.github/workflows/test.yml

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -45,45 +45,47 @@ jobs:
4545
# https://github.com/rust-lang/cargo/issues/6669
4646
- name: cargo test --doc
4747
run: cargo test --locked --all-features --doc
48-
minimal:
49-
# This action chooses the oldest version of the dependencies permitted by Cargo.toml to ensure
50-
# that this crate is compatible with the minimal version that this crate and its dependencies
51-
# require. This will pickup issues where this create relies on functionality that was introduced
52-
# later than the actual version specified (e.g., when we choose just a major version, but a
53-
# method was added after this version).
54-
#
55-
# This particular check can be difficult to get to succeed as often transitive dependencies may
56-
# be incorrectly specified (e.g., a dependency specifies 1.0 but really requires 1.1.5). There
57-
# is an alternative flag available -Zdirect-minimal-versions that uses the minimal versions for
58-
# direct dependencies of this crate, while selecting the maximal versions for the transitive
59-
# dependencies. Alternatively, you can add a line in your Cargo.toml to artificially increase
60-
# the minimal dependency, which you do with e.g.:
61-
# ```toml
62-
# # for minimal-versions
63-
# [target.'cfg(any())'.dependencies]
64-
# openssl = { version = "0.10.55", optional = true } # needed to allow foo to build with -Zminimal-versions
65-
# ```
66-
# The optional = true is necessary in case that dependency isn't otherwise transitively required
67-
# by your library, and the target bit is so that this dependency edge never actually affects
68-
# Cargo build order. See also
69-
# https://github.com/jonhoo/fantoccini/blob/fde336472b712bc7ebf5b4e772023a7ba71b2262/Cargo.toml#L47-L49.
70-
# This action is run on ubuntu with the stable toolchain, as it is not expected to fail
71-
runs-on: ubuntu-latest
72-
name: ubuntu / stable / minimal-versions
73-
steps:
74-
- uses: actions/checkout@v4
75-
with:
76-
submodules: true
77-
- name: Install stable
78-
uses: dtolnay/rust-toolchain@stable
79-
- name: Install nightly for -Zminimal-versions
80-
uses: dtolnay/rust-toolchain@nightly
81-
- name: rustup default stable
82-
run: rustup default stable
83-
- name: cargo update -Zminimal-versions
84-
run: cargo +nightly update -Zminimal-versions
85-
- name: cargo test
86-
run: cargo test --locked --all-features --all-targets
48+
# TODO: Experienced issue with twox-hash-1.6.3, re-enable once fixed.
49+
# Failed workflow: https://github.com/cmu-db/optd/actions/runs/13323412234/job/37211945474?pr=26
50+
# minimal:
51+
# # This action chooses the oldest version of the dependencies permitted by Cargo.toml to ensure
52+
# # that this crate is compatible with the minimal version that this crate and its dependencies
53+
# # require. This will pickup issues where this create relies on functionality that was introduced
54+
# # later than the actual version specified (e.g., when we choose just a major version, but a
55+
# # method was added after this version).
56+
# #
57+
# # This particular check can be difficult to get to succeed as often transitive dependencies may
58+
# # be incorrectly specified (e.g., a dependency specifies 1.0 but really requires 1.1.5). There
59+
# # is an alternative flag available -Zdirect-minimal-versions that uses the minimal versions for
60+
# # direct dependencies of this crate, while selecting the maximal versions for the transitive
61+
# # dependencies. Alternatively, you can add a line in your Cargo.toml to artificially increase
62+
# # the minimal dependency, which you do with e.g.:
63+
# # ```toml
64+
# # # for minimal-versions
65+
# # [target.'cfg(any())'.dependencies]
66+
# # openssl = { version = "0.10.55", optional = true } # needed to allow foo to build with -Zminimal-versions
67+
# # ```
68+
# # The optional = true is necessary in case that dependency isn't otherwise transitively required
69+
# # by your library, and the target bit is so that this dependency edge never actually affects
70+
# # Cargo build order. See also
71+
# # https://github.com/jonhoo/fantoccini/blob/fde336472b712bc7ebf5b4e772023a7ba71b2262/Cargo.toml#L47-L49.
72+
# # This action is run on ubuntu with the stable toolchain, as it is not expected to fail
73+
# runs-on: ubuntu-latest
74+
# name: ubuntu / stable / minimal-versions
75+
# steps:
76+
# - uses: actions/checkout@v4
77+
# with:
78+
# submodules: true
79+
# - name: Install stable
80+
# uses: dtolnay/rust-toolchain@stable
81+
# - name: Install nightly for -Zminimal-versions
82+
# uses: dtolnay/rust-toolchain@nightly
83+
# - name: rustup default stable
84+
# run: rustup default stable
85+
# - name: cargo update -Zminimal-versions
86+
# run: cargo +nightly update -Zminimal-versions
87+
# - name: cargo test
88+
# run: cargo test --locked --all-features --all-targets
8789
os-check:
8890
# run cargo test on mac and windows
8991
runs-on: ${{ matrix.os }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ target/
1212
*.db
1313
*.db-shm
1414
*.db-wal
15+
.history

.sqlx/query-a80ed7123532bfaf7e8360623ea8f491a37dca665205cba7d69d0c9a657a16d9.json

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)