Skip to content

Commit

Permalink
Merge pull request #66 from pdet/update_substrait
Browse files Browse the repository at this point in the history
Update Substrait from 0.24 to 0.35
  • Loading branch information
pdet authored Oct 4, 2023
2 parents 5d621b1 + 9b56b26 commit 16e1318
Show file tree
Hide file tree
Showing 7 changed files with 6,511 additions and 1,698 deletions.
32 changes: 27 additions & 5 deletions .github/workflows/r.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,40 @@ jobs:
run: |
sudo apt-get update -y -qq && sudo apt-get install -y -qq ninja-build libcurl4-openssl-dev
mkdir -p $HOME/.R
(cd duckdb/tools/rpkg && R -f dependencies.R)
(cd scripts && R -f dependencies.R)
- uses: actions/checkout@v3
with:
path: ${{ env.DUCKDB_SRC }}

- uses: actions/checkout@v3
with:
repository: ${{ env.DUCKDB_R_REPO }}
path: ${{ env.DUCKDB_R_SRC }}

# needed so we can run git commit in vendor.sh
- name: setup github and create parallel builds
shell: bash
run: |
git config --global user.email "[email protected]"
git config --global user.name "mr. duck"
mkdir -p ~/.R
echo 'MAKEFLAGS = -j2' >> ~/.R/Makevars
# error is from git_dev_version() but does not affect this workflow
- name: update duckdb-r src code with PR code
shell: bash
working-directory: ${{ env.DUCKDB_R_SRC }}
run: (cd duckdb-r && ./vendor.sh duckdb)

- name: Build Extension
run: |
make release
- name: Build DuckDB (R)
run: |
cd duckdb/tools/rpkg
./configure
R CMD build .
R CMD INSTALL -d duckdb_*.tar.gz
cd duckdb-r
R CMD INSTALL .
- name: Test R
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "duckdb"]
path = duckdb
url = https://github.com/duckdb/duckdb
[submodule "duckdb-r"]
path = duckdb-r
url = https://github.com/duckdb/duckdb-r
1 change: 1 addition & 0 deletions duckdb-r
Submodule duckdb-r added at 38463c
12 changes: 12 additions & 0 deletions scripts/dependencies.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
local({
pkg <- c("DBI", "callr", "DBItest", "dbplyr", "testthat", "bit64", "cpp11", "arrow", "covr", "pkgbuild", "remotes")

if (.Platform$OS.type == "unix") {
options(HTTPUserAgent = sprintf("R/4.1.0 R (4.1.0 %s)", paste(R.version$platform, R.version$arch, R.version$os)))
install.packages(pkg, repos = "https://packagemanager.rstudio.com/all/__linux__/focal/latest")
# https://github.com/r-lib/covr/pull/499
remotes::install_github("r-lib/covr")
} else {
install.packages(pkg, repos = "https://cloud.r-project.org", pkgType = "binary")
}
})
3 changes: 2 additions & 1 deletion scripts/update_substrait.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import shutil
from os import walk

GITHUB_TAG = "335a4dc74ccb3ef88769878d36c35e511e47ef70" # V0.24
GITHUB_TAG = "9e39067e49f453f1df998c3c4a821e53dd7a1e8f" # V0.35
# Change to substrait folder
sub_folder = os.path.join(os.path.dirname(os.path.realpath(__file__)),'..','third_party','substrait')
os.chdir(sub_folder)
Expand Down Expand Up @@ -35,6 +35,7 @@

proto_sub_extensions = next(walk(substrait_extensions_proto_folder), (None, None, []))[2]

# /usr/local/bin/protoc
print("Protoc version" + os.popen('protoc --version').read())

for proto in proto_sub_list:
Expand Down
4,910 changes: 3,470 additions & 1,440 deletions third_party/substrait/substrait/algebra.pb.cc

Large diffs are not rendered by default.

3,248 changes: 2,996 additions & 252 deletions third_party/substrait/substrait/algebra.pb.h

Large diffs are not rendered by default.

0 comments on commit 16e1318

Please sign in to comment.