Skip to content

Commit a25ccb3

Browse files
author
silezhou
committed
merge upstream
1 parent 2cdc453 commit a25ccb3

File tree

336 files changed

+22361
-15131
lines changed

Some content is hidden

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

336 files changed

+22361
-15131
lines changed

.github/workflows/dev_pr/labeler.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,20 @@ sql:
2929

3030
logical-expr:
3131
- changed-files:
32-
- any-glob-to-any-file: ['datafusion/expr/**/*']
32+
- any-glob-to-any-file: ['datafusion/expr/**/*', 'datafusion/expr-common/**/*']
33+
34+
ffi:
35+
- changed-files:
36+
- any-glob-to-any-file: ['datafusion/ffi/**/*']
3337

3438
physical-expr:
3539
- changed-files:
36-
- any-glob-to-any-file: ['datafusion/physical-expr/**/*', 'datafusion/physical-expr-common/**/*', 'datafusion/physical-expr-aggregate/**/*', 'datafusion/physical-plan/**/*']
40+
- any-glob-to-any-file: ['datafusion/physical-expr/**/*', 'datafusion/physical-expr-common/**/*', 'datafusion/physical-expr-aggregate/**/*']
41+
42+
physical-plan:
43+
- changed-files:
44+
- any-glob-to-any-file: [datafusion/physical-plan/**/*']
45+
3746

3847
catalog:
3948
- changed-files:
@@ -47,6 +56,10 @@ execution:
4756
- changed-files:
4857
- any-glob-to-any-file: ['datafusion/execution/**/*']
4958

59+
datasource:
60+
- changed-files:
61+
- any-glob-to-any-file: ['datafusion/datasource/**/*']
62+
5063
functions:
5164
- changed-files:
5265
- any-glob-to-any-file: ['datafusion/functions/**/*', 'datafusion/functions-aggregate/**/*', 'datafusion/functions-aggregate-common', 'datafusion/functions-nested']

.github/workflows/docs.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
118
on:
219
push:
320
branches:

.github/workflows/docs_pr.yaml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18+
# Tests for Docs that runs on PRs
1819
name: Docs
1920

2021
concurrency:
@@ -48,7 +49,34 @@ jobs:
4849
uses: ./.github/actions/setup-builder
4950
with:
5051
rust-version: stable
51-
- name: Run doctests
52+
- name: Run doctests (embedded rust examples)
5253
run: cargo test --doc --features avro,json
5354
- name: Verify Working Directory Clean
5455
run: git diff --exit-code
56+
57+
# Test doc build
58+
linux-test-doc-build:
59+
name: Test doc build
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v4
63+
with:
64+
submodules: true
65+
fetch-depth: 1
66+
- name: Setup Python
67+
uses: actions/setup-python@v5
68+
with:
69+
python-version: "3.12"
70+
- name: Install doc dependencies
71+
run: |
72+
set -x
73+
python3 -m venv venv
74+
source venv/bin/activate
75+
pip install -r docs/requirements.txt
76+
- name: Build docs html and check for warnings
77+
run: |
78+
set -x
79+
source venv/bin/activate
80+
cd docs
81+
./build.sh # fails on errors
82+

.github/workflows/extended.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
linux-build-lib:
3737
name: linux build test
3838
runs-on: ubuntu-latest
39+
# note: do not use amd/rust container to preserve disk space
3940
steps:
4041
- uses: actions/checkout@v4
4142
with:
@@ -45,7 +46,7 @@ jobs:
4546
run: |
4647
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
4748
source $HOME/.cargo/env
48-
rustup default stable
49+
rustup toolchain install
4950
- name: Install Protobuf Compiler
5051
run: sudo apt-get install -y protobuf-compiler
5152
- name: Prepare cargo build
@@ -58,6 +59,7 @@ jobs:
5859
name: cargo test 'extended_tests' (amd64)
5960
needs: linux-build-lib
6061
runs-on: ubuntu-latest
62+
# note: do not use amd/rust container to preserve disk space
6163
steps:
6264
- uses: actions/checkout@v4
6365
with:
@@ -69,7 +71,7 @@ jobs:
6971
run: |
7072
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
7173
source $HOME/.cargo/env
72-
rustup default stable
74+
rustup toolchain install
7375
- name: Install Protobuf Compiler
7476
run: sudo apt-get install -y protobuf-compiler
7577
# For debugging, test binaries can be large.
@@ -122,7 +124,7 @@ jobs:
122124
rust-version: stable
123125
- name: Run sqllogictest
124126
run: |
125-
cargo test --profile release-nonlto --test sqllogictests -- --include-sqlite
127+
cargo test --features backtrace --profile release-nonlto --test sqllogictests -- --include-sqlite
126128
cargo clean
127129
128130

.github/workflows/rust.yml

Lines changed: 107 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,12 @@ jobs:
6666
# the changes to `Cargo.lock` after building with the updated manifest.
6767
cargo check --profile ci --workspace --all-targets --features integration-tests --locked
6868
69-
# cargo check common, functions and substrait with no default features
70-
linux-cargo-check-no-default-features:
71-
name: cargo check no default features
69+
# Check datafusion-common features
70+
#
71+
# Ensure via `cargo check` that the crate can be built with a
72+
# subset of the features packages enabled.
73+
linux-datafusion-common-features:
74+
name: cargo check datafusion-common features
7275
needs: linux-build-lib
7376
runs-on: ubuntu-latest
7477
container:
@@ -79,28 +82,68 @@ jobs:
7982
uses: ./.github/actions/setup-builder
8083
with:
8184
rust-version: stable
82-
- name: Check datafusion without default features
83-
# Some of the test binaries require the parquet feature still
84-
#run: cargo check --all-targets --no-default-features -p datafusion
85-
run: cargo check --profile ci --no-default-features -p datafusion
86-
87-
- name: Check datafusion-common without default features
85+
- name: Check datafusion-common (no-default-features)
8886
run: cargo check --profile ci --all-targets --no-default-features -p datafusion-common
87+
# Note: don't check other feature flags as datafusion-common is not typically used standalone
8988

90-
- name: Check datafusion-functions without default features
91-
run: cargo check --profile ci --all-targets --no-default-features -p datafusion-functions
92-
93-
- name: Check datafusion-substrait without default features
89+
# Check datafusion-substrait features
90+
#
91+
# Ensure via `cargo check` that the crate can be built with a
92+
# subset of the features packages enabled.
93+
linux-datafusion-substrait-features:
94+
name: cargo check datafusion-substrait features
95+
needs: linux-build-lib
96+
runs-on: ubuntu-latest
97+
container:
98+
image: amd64/rust
99+
steps:
100+
- uses: actions/checkout@v4
101+
- name: Setup Rust toolchain
102+
uses: ./.github/actions/setup-builder
103+
with:
104+
rust-version: stable
105+
- name: Check datafusion-substrait (no-default-features)
94106
run: cargo check --profile ci --all-targets --no-default-features -p datafusion-substrait
107+
- name: Check datafusion-substrait (physical)
108+
run: cargo check --profile ci --all-targets --no-default-features -p datafusion-substrait --features=physical
109+
- name: Install cmake
110+
run: |
111+
# note the builder setup runs apt-get update / installs protobuf compiler
112+
apt-get install -y cmake
113+
- name: Check datafusion-substrait (protoc)
114+
run: cargo check --profile ci --all-targets --no-default-features -p datafusion-substrait --features=protoc
95115

96-
- name: Check workspace in debug mode
97-
run: cargo check --profile ci --all-targets --workspace
98-
99-
- name: Check workspace with additional features
100-
run: cargo check --profile ci --workspace --benches --features avro,json,integration-tests
101-
102-
# cargo check datafusion to ensure that the datafusion crate can be built with only a
103-
# subset of the function packages enabled.
116+
# Check datafusion-proto features
117+
#
118+
# Ensure via `cargo check` that the crate can be built with a
119+
# subset of the features packages enabled.
120+
linux-datafusion-proto-features:
121+
name: cargo check datafusion-proto features
122+
needs: linux-build-lib
123+
runs-on: ubuntu-latest
124+
container:
125+
image: amd64/rust
126+
steps:
127+
- uses: actions/checkout@v4
128+
- name: Setup Rust toolchain
129+
uses: ./.github/actions/setup-builder
130+
with:
131+
rust-version: stable
132+
- name: Check datafusion-proto (no-default-features)
133+
run: cargo check --profile ci --all-targets --no-default-features -p datafusion-proto
134+
# fails due to https://github.com/apache/datafusion/issues/15157
135+
#- name: Check datafusion-proto (json)
136+
# run: cargo check --profile ci --all-targets --no-default-features -p datafusion-proto --features=json
137+
- name: Check datafusion-proto (parquet)
138+
run: cargo check --profile ci --all-targets --no-default-features -p datafusion-proto --features=parquet
139+
- name: Check datafusion-proto (avro)
140+
run: cargo check --profile ci --all-targets --no-default-features -p datafusion-proto --features=avro
141+
142+
143+
# Check datafusion crate features
144+
#
145+
# Ensure via `cargo check` that the crate can be built with a
146+
# subset of the features packages enabled.
104147
linux-cargo-check-datafusion:
105148
name: cargo check datafusion
106149
needs: linux-build-lib
@@ -113,6 +156,11 @@ jobs:
113156
uses: ./.github/actions/setup-builder
114157
with:
115158
rust-version: stable
159+
- name: Check datafusion (no-default-features)
160+
# Some of the test binaries require the parquet feature still
161+
#run: cargo check --all-targets --no-default-features -p datafusion
162+
run: cargo check --profile ci --no-default-features -p datafusion
163+
116164
- name: Check datafusion (nested_expressions)
117165
run: cargo check --profile ci --no-default-features --features=nested_expressions -p datafusion
118166

@@ -134,8 +182,10 @@ jobs:
134182
- name: Check datafusion (string_expressions)
135183
run: cargo check --profile ci --no-default-features --features=string_expressions -p datafusion
136184

137-
# cargo check datafusion-functions to ensure that the datafusion-functions crate can be built with
138-
# only a subset of the function packages enabled.
185+
# Check datafusion-functions crate features
186+
#
187+
# Ensure via `cargo check` that the crate can be built with a
188+
# subset of the features packages enabled.
139189
linux-cargo-check-datafusion-functions:
140190
name: cargo check functions
141191
needs: linux-build-lib
@@ -148,6 +198,9 @@ jobs:
148198
uses: ./.github/actions/setup-builder
149199
with:
150200
rust-version: stable
201+
- name: Check datafusion-functions (no-default-features)
202+
run: cargo check --profile ci --all-targets --no-default-features -p datafusion-functions
203+
151204
- name: Check datafusion-functions (crypto)
152205
run: cargo check --profile ci --all-targets --no-default-features --features=crypto_expressions -p datafusion-functions
153206

@@ -171,21 +224,41 @@ jobs:
171224
name: cargo test (amd64)
172225
needs: linux-build-lib
173226
runs-on: ubuntu-latest
174-
container:
175-
image: amd64/rust
176227
steps:
177228
- uses: actions/checkout@v4
178229
with:
179230
submodules: true
180231
fetch-depth: 1
181232
- name: Setup Rust toolchain
182-
uses: ./.github/actions/setup-builder
183-
with:
184-
rust-version: stable
233+
run: rustup toolchain install stable
234+
- name: Install Protobuf Compiler
235+
run: sudo apt-get install -y protobuf-compiler
236+
- name: Setup Minio - S3-compatible storage
237+
run: |
238+
docker run -d --name minio-container \
239+
-p 9000:9000 \
240+
-e MINIO_ROOT_USER=TEST-DataFusionLogin -e MINIO_ROOT_PASSWORD=TEST-DataFusionPassword \
241+
-v $(pwd)/datafusion/core/tests/data:/source quay.io/minio/minio \
242+
server /data
243+
docker exec minio-container /bin/sh -c "\
244+
mc ready local
245+
mc alias set localminio http://localhost:9000 TEST-DataFusionLogin TEST-DataFusionPassword && \
246+
mc mb localminio/data && \
247+
mc cp -r /source/* localminio/data"
185248
- name: Run tests (excluding doctests)
249+
env:
250+
RUST_BACKTRACE: 1
251+
AWS_ENDPOINT: http://127.0.0.1:9000
252+
AWS_ACCESS_KEY_ID: TEST-DataFusionLogin
253+
AWS_SECRET_ACCESS_KEY: TEST-DataFusionPassword
254+
TEST_STORAGE_INTEGRATION: 1
255+
AWS_ALLOW_HTTP: true
186256
run: cargo test --profile ci --exclude datafusion-examples --exclude ffi_example_table_provider --exclude datafusion-benchmarks --workspace --lib --tests --bins --features avro,json,backtrace,integration-tests
187257
- name: Verify Working Directory Clean
188258
run: git diff --exit-code
259+
- name: Minio Output
260+
if: ${{ !cancelled() }}
261+
run: docker logs minio-container
189262

190263
linux-test-example:
191264
name: cargo examples (amd64)
@@ -259,6 +332,10 @@ jobs:
259332
uses: ./.github/actions/setup-builder
260333
with:
261334
rust-version: stable
335+
- name: Install dependencies
336+
run: |
337+
apt-get update -qq
338+
apt-get install -y -qq clang
262339
- name: Install wasm-pack
263340
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
264341
- name: Build with wasm-pack
@@ -295,7 +372,7 @@ jobs:
295372
export RUST_MIN_STACK=20971520
296373
export TPCH_DATA=`realpath datafusion/sqllogictest/test_files/tpch/data`
297374
cargo test plan_q --package datafusion-benchmarks --profile ci --features=ci -- --test-threads=1
298-
INCLUDE_TPCH=true cargo test --profile ci --package datafusion-sqllogictest --test sqllogictests
375+
INCLUDE_TPCH=true cargo test --features backtrace --profile ci --package datafusion-sqllogictest --test sqllogictests
299376
- name: Verify Working Directory Clean
300377
run: git diff --exit-code
301378

@@ -331,7 +408,7 @@ jobs:
331408
- name: Run sqllogictest
332409
run: |
333410
cd datafusion/sqllogictest
334-
PG_COMPAT=true PG_URI="postgresql://postgres:postgres@$POSTGRES_HOST:$POSTGRES_PORT/db_test" cargo test --profile ci --features=postgres --test sqllogictests
411+
PG_COMPAT=true PG_URI="postgresql://postgres:postgres@$POSTGRES_HOST:$POSTGRES_PORT/db_test" cargo test --features backtrace --profile ci --features=postgres --test sqllogictests
335412
env:
336413
# use postgres for the host here because we have specified a container for the job
337414
POSTGRES_HOST: postgres

0 commit comments

Comments
 (0)