Skip to content

Commit 2251b56

Browse files
Bug/deltalake s3 (#345)
1 parent c465569 commit 2251b56

6 files changed

Lines changed: 795 additions & 79 deletions

File tree

.github/workflows/test.yml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -179,24 +179,29 @@ jobs:
179179
matrix:
180180
arch: [amd64]
181181
steps:
182-
- uses: actions/checkout@v2
183-
with:
184-
submodules: true
185-
- name: Cache Cargo
186-
uses: actions/cache@v4
187-
with:
188-
path: /home/runner/.cargo
189-
key: cargo-dft-cache-
190-
- name: Cache Rust dependencies
191-
uses: actions/cache@v4
192-
with:
193-
path: target
194-
key: ${{ runner.os }}-cargo-target-${{ hashFiles('Cargo.lock') }}
182+
- uses: actions/checkout@v3
195183
- name: Setup Rust Toolchain
196184
uses: ./.github/actions/setup-rust
185+
- name: Start LocalStack
186+
uses: LocalStack/setup-localstack@v0.2.3
187+
with:
188+
image-tag: 'latest'
189+
install-awslocal: 'true'
190+
configuration: DEBUG=1
191+
- name: Upload Delta Lake data to LocalStack
192+
run: |
193+
awslocal s3 mb s3://test
194+
awslocal s3 sync data/deltalake/simple_table s3://test/deltalake/simple_table
195+
echo "Delta Lake data uploaded to LocalStack"
197196
- name: Run Deltalake tests
198197
run: |
199-
cargo test --features=deltalake extension_cases::deltalake
198+
cargo test --features="deltalake s3" extension_cases::deltalake
199+
env:
200+
AWS_ACCESS_KEY_ID: LSIAQAAAAAAVNCBMPNSG
201+
AWS_SECRET_ACCESS_KEY: 5555555555555555555555555555555555555555
202+
AWS_ENDPOINT_URL: http://localhost:4566
203+
AWS_REGION: us-east-1
204+
AWS_ALLOW_HTTP: true
200205
test-udfs-wasm:
201206
name: Extension / UDFs-WASM
202207
runs-on: ubuntu-latest

CLAUDE.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ cargo test --features=flightsql extension_cases::flightsql -- --test-threads=1
5252
cargo test --features=s3 extension_cases::s3
5353
cargo test --features=functions-json extension_cases::functions_json
5454
cargo test --features=deltalake extension_cases::deltalake
55+
cargo test --features="deltalake s3" extension_cases::deltalake::test_deltalake_s3 # Requires LocalStack
5556
cargo test --features=udfs-wasm extension_cases::udfs_wasm
5657
cargo test --features=vortex extension_cases::vortex
5758
cargo test --features=vortex cli_cases::basic::test_output_vortex
@@ -189,16 +190,20 @@ The main runtime in `src/main.rs` uses a single-threaded Tokio runtime optimized
189190

190191
### Testing Against LocalStack
191192

192-
Some tests (S3, TUI, CLI) require LocalStack for S3 testing. The CI workflow shows the setup:
193+
Some tests (S3, TUI, CLI, Delta Lake + S3) require LocalStack for S3 testing. The CI workflow shows the setup:
193194

194195
```bash
195196
# Start LocalStack
196197
localstack start -d
197-
awslocal s3api create-bucket --bucket tmp --acl public-read
198-
awslocal s3 mv data/aggregate_test_100.csv s3://tmp/
198+
awslocal s3api create-bucket --bucket test --acl public-read
199+
awslocal s3 mv data/aggregate_test_100.csv s3://test/
199200

200-
# Run tests
201+
# Run S3 tests
201202
cargo test --features=s3 extension_cases::s3
203+
204+
# For Delta Lake + S3 tests, also sync the delta lake data
205+
awslocal s3 sync data/deltalake/simple_table s3://test/deltalake/simple_table
206+
cargo test --features="deltalake s3" extension_cases::deltalake::test_deltalake_s3
202207
```
203208

204209
### Benchmarking

0 commit comments

Comments
 (0)