Skip to content

Commit 8090d2f

Browse files
committed
remove j4rs dep by default
1 parent e4d1777 commit 8090d2f

File tree

3 files changed

+15
-74
lines changed

3 files changed

+15
-74
lines changed

.github/workflows/release.yml

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -64,33 +64,6 @@ jobs:
6464
env:
6565
SQLITE3_STATIC: 1
6666

67-
- name: Copy j4rs dependencies into dist
68-
run: |
69-
cp -rf connectorx-python/target/release/jassets connectorx-python/connectorx/dependencies
70-
71-
# rebuild the wheel to incorporate j4rs dependencies
72-
- uses: PyO3/maturin-action@v1
73-
with:
74-
rust-toolchain: stable
75-
command: build
76-
args: -m connectorx-python/Cargo.toml -i python --release --manylinux 2_28 --features integrated-auth-gssapi
77-
before-script-linux: |
78-
# If we're running on rhel centos, install needed packages.
79-
if command -v yum &> /dev/null; then
80-
yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic
81-
82-
# If we're running on i686 we need to symlink libatomic
83-
# in order to build openssl with -latomic flag.
84-
if [[ ! -d "/usr/lib64" ]]; then
85-
ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
86-
fi
87-
else
88-
# If we're running on debian-based system.
89-
apt update -y && apt-get install -y libssl-dev openssl pkg-config
90-
fi
91-
env:
92-
SQLITE3_STATIC: 1
93-
9467
- uses: actions/upload-artifact@v4
9568
with:
9669
name: "ubuntu-latest-${{ matrix.python-version[1] }}"
@@ -139,19 +112,6 @@ jobs:
139112
# env:
140113
# SQLITE3_STATIC: 1
141114

142-
# - name: Copy j4rs dependencies into dist
143-
# run: |
144-
# cp -rf connectorx-python/target/release/jassets connectorx-python/connectorx/dependencies
145-
146-
# # rebuild the wheel to incorporate j4rs dependencies
147-
# - uses: PyO3/maturin-action@v1
148-
# with:
149-
# rust-toolchain: 1.71.1
150-
# command: build
151-
# args: -m connectorx-python/Cargo.toml --target aarch64-unknown-linux-gnu -i python --release --manylinux 2_28 --features integrated-auth-gssapi
152-
# env:
153-
# SQLITE3_STATIC: 1
154-
155115
# - uses: actions/upload-artifact@v3
156116
# with:
157117
# name: "aarch-${{ matrix.python-version[1] }}"
@@ -203,20 +163,6 @@ jobs:
203163
env:
204164
SQLITE3_STATIC: 1
205165

206-
- name: Copy j4rs dependencies into dist
207-
run: |
208-
cp -r connectorx-python/target/release/jassets connectorx-python/connectorx/dependencies
209-
210-
# rebuild the wheel to incorporate j4rs dependencies
211-
- uses: PyO3/maturin-action@v1
212-
with:
213-
rust-toolchain: stable
214-
maturin-version: v0.14.15
215-
command: build
216-
args: -m connectorx-python/Cargo.toml -i python --release ${{ matrix.features }}
217-
env:
218-
SQLITE3_STATIC: 1
219-
220166
- uses: actions/upload-artifact@v4
221167
with:
222168
name: "${{ matrix.os }}-${{ matrix.python-version }}"
@@ -264,20 +210,6 @@ jobs:
264210
env:
265211
SQLITE3_STATIC: 1
266212

267-
- name: Copy j4rs dependencies into dist
268-
run: |
269-
cp -rf connectorx-python/target/aarch64-apple-darwin/release/jassets connectorx-python/connectorx/dependencies
270-
271-
# rebuild the wheel to incorporate j4rs dependencies
272-
- uses: PyO3/maturin-action@v1
273-
with:
274-
rust-toolchain: stable
275-
maturin-version: v0.14.15
276-
command: build
277-
args: -m connectorx-python/Cargo.toml --target aarch64-apple-darwin -i python --release --features integrated-auth-gssapi
278-
env:
279-
SQLITE3_STATIC: 1
280-
281213
- uses: actions/upload-artifact@v4
282214
with:
283215
name: "macos-arm-${{ matrix.python-version }}"

Federation.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22

33
We use [accio](https://github.com/sfu-db/accio) to rewrite a federated query into multiple single-source ones, and combine the result locally with [datafusion](https://github.com/apache/datafusion).
44

5-
To enable query federation for connectorx:
6-
1. Clone accio: `[email protected]:sfu-db/accio.git`.
7-
2. Build accio: `cd accio/rewriter && mvn package -Dmaven.test.skip=true`.
8-
3. Move the jar file to location `${YOUR_LOCAL_PYTHON_PATH}/site-packages/connectorx/dependencies/federated-rewriter.jar`
9-
4. Configure accio and set the configuration path as `FED_CONFIG_PATH`. Example configurations can be found [here](https://github.com/sfu-db/accio/tree/main/benchmark/config/tpch10_datafusion/10gbit).
10-
5. Run federated query using connectorx!
5+
6+
Currently, this feature is only enabled by building connectorx from source code as follows:
7+
8+
1. Clone connectorx: `git clone [email protected]:sfu-db/connector-x.git`.
9+
2. Build connectorx from source follows the [instruction](https://sfu-db.github.io/connector-x/install.html#build-from-source-code). Note, for the final step, build wheel with `build-python-wheel-fed` command instead of `build-python-wheel`.
10+
3. Install connectorx: `pip install ${YOUR_LOCAL_CONNECTORX_PATH}/connectorx-python/target/wheels/${YOUR_WHEEL_FILE}`.
11+
4. Clone accio: `git clone [email protected]:sfu-db/accio.git`.
12+
5. Build accio: `cd accio/rewriter && mvn package -Dmaven.test.skip=true`.
13+
6. Move the jar file to location `${YOUR_LOCAL_PYTHON_PATH}/site-packages/connectorx/dependencies/federated-rewriter.jar`
14+
7. Configure accio and set the configuration path as `FED_CONFIG_PATH`. Example configurations can be found [here](https://github.com/sfu-db/accio/tree/main/benchmark/config/tpch10_datafusion/10gbit).
15+
8. Run federated query using connectorx!
1116

1217
Alternatively, accio provides wrappers that can directly run federated queries on various query engines. In particular, it uses connectorx as the data fetching method when datafusion or polars are the federation engine. For more details, check out [here](https://github.com/sfu-db/accio).

Justfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ benchmark-report: setup-python
100100

101101
# releases
102102
build-python-wheel:
103+
cd connectorx-python && maturin build --release -i python
104+
105+
# release with federation enabled
106+
build-python-wheel-fed:
103107
# need to get the j4rs dependency first
104108
cd connectorx-python && maturin build --release -i python
105109
# copy files

0 commit comments

Comments
 (0)