Skip to content

Commit 9d2b75c

Browse files
authored
feat: package extension yamls (#15)
1 parent fdf68ea commit 9d2b75c

16 files changed

+4791
-0
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
src/substrait/gen/** linguist-generated=true
2+
src/substrait/extensions/** linguist-generated=true

gen_proto.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ submodule_dir=./third_party/substrait
77
src_dir="$submodule_dir"/proto
88
tmp_dir=./buf_work_dir
99
dest_dir=./src/substrait/gen
10+
extension_dir=./src/substrait/extensions
1011

1112
# Prefix the protobuf files with a unique configuration to prevent namespace conflicts
1213
# with other substrait packages. Save output to the work dir.
@@ -19,5 +20,12 @@ rm -rf "$dest_dir"
1920
buf generate
2021
protol --in-place --create-package --python-out "$dest_dir" buf
2122

23+
# Remove the old extension files
24+
rm -rf "$extension_dir"
25+
26+
# Copy over new yaml files
27+
cp -fr "$submodule_dir"/extensions "$extension_dir"
28+
find "$extension_dir" -type f -exec chmod u+rw {} +
29+
2230
# Remove the temporary work dir
2331
rm -rf "$tmp_dir"

src/substrait/extensions/extension_types.yaml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/substrait/extensions/functions_aggregate_approx.yaml

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/substrait/extensions/functions_aggregate_generic.yaml

Lines changed: 37 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)