Skip to content

Commit c8fd321

Browse files
authored
Merge branch 'main' into feat/rg-reorder-by-statistics
2 parents b196f3c + 0c38ebb commit c8fd321

175 files changed

Lines changed: 10877 additions & 2374 deletions

File tree

Some content is hidden

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

.asf.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,29 @@ github:
6060
- "Spell Check with Typos"
6161
- "Circular Dependency Check"
6262
- "Detect Unused Dependencies"
63+
- "linux build test"
64+
- "cargo check datafusion-common features"
65+
- "cargo check datafusion-substrait features"
66+
- "cargo check datafusion-proto features"
67+
- "cargo check datafusion features"
68+
- "cargo check datafusion-functions features"
69+
- "cargo test (amd64)"
70+
- "cargo test datafusion-cli (amd64)"
71+
- "cargo examples (amd64)"
72+
- "cargo test doc (amd64)"
73+
- "cargo doc"
74+
- "build and run with wasm-pack"
75+
- "verify benchmark results (amd64)"
76+
- "Run sqllogictest with Postgres runner"
77+
- "Run sqllogictest in Substrait round-trip mode"
78+
- "cargo test (macos-aarch64)"
79+
- "Verify Vendored Code"
80+
- "Check cargo fmt"
81+
- "clippy"
82+
- "check Cargo.toml formatting"
83+
- "check configs.md and ***_functions.md is up-to-date"
84+
- "check example README is up-to-date"
85+
- "Verify MSRV (Min Supported Rust Version)"
6386
# needs to be updated as part of the release process
6487
# .asf.yaml doesn't support wildcard branch protection rules, only exact branch names
6588
# https://github.com/apache/infrastructure-asfyaml?tab=readme-ov-file#branch-protection

.github/workflows/audit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
steps:
4646
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4747
- name: Install cargo-audit
48-
uses: taiki-e/install-action@481c34c1cf3a84c68b5e46f4eccfc82af798415a # v2.75.23
48+
uses: taiki-e/install-action@7ea35f098a7369cd23488403f58be9c491a6c55f # v2.77.0
4949
with:
5050
tool: cargo-audit
5151
- name: Run audit check

.github/workflows/breaking_changes_detector.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,22 @@ jobs:
5959
with:
6060
fetch-depth: 0
6161

62-
# For fork PRs, `origin` points to the fork, not the upstream repo.
63-
# Explicitly fetch the base branch from the upstream repo so we have
64-
# a valid baseline ref for both diff and semver-checks.
62+
# `origin` may point at a fork (when a contributor runs this locally) or
63+
# at a stale ref. Fetch the base branch from the PR's upstream repo into
64+
# a dedicated `apache/<base>` ref so the baseline is unambiguous and the
65+
# same ref name works locally (`git remote add apache ...`) and in CI.
6566
- name: Fetch base branch
6667
env:
6768
BASE_REF: ${{ github.base_ref }}
6869
REPO: ${{ github.repository }}
69-
run: git fetch "https://github.com/${REPO}.git" "${BASE_REF}:refs/remotes/origin/${BASE_REF}"
70+
run: git fetch "https://github.com/${REPO}.git" "${BASE_REF}:refs/remotes/apache/${BASE_REF}"
7071

7172
- name: Determine changed crates
7273
id: changed_crates
7374
env:
7475
BASE_REF: ${{ github.base_ref }}
7576
run: |
76-
PACKAGES=$(ci/scripts/changed_crates.sh changed-crates "origin/${BASE_REF}")
77+
PACKAGES=$(ci/scripts/changed_crates.sh changed-crates "apache/${BASE_REF}")
7778
echo "packages=$PACKAGES" >> "$GITHUB_OUTPUT"
7879
echo "Changed crates: $PACKAGES"
7980
@@ -88,7 +89,7 @@ jobs:
8889
8990
- name: Install cargo-semver-checks
9091
if: steps.changed_crates.outputs.packages != ''
91-
uses: taiki-e/install-action@94cb46f8d6e437890146ffbd78a778b78e623fb2 # v2.74.0
92+
uses: taiki-e/install-action@7ea35f098a7369cd23488403f58be9c491a6c55f # v2.77.0
9293
with:
9394
tool: cargo-semver-checks
9495

@@ -102,7 +103,8 @@ jobs:
102103
set +e
103104
# `tee` lets cargo's output stream live into the Actions log
104105
# while we also keep a copy for the PR comment.
105-
ci/scripts/changed_crates.sh semver-check "origin/${BASE_REF}" $PACKAGES \
106+
# Using `apache` remote here to point to the repository the pull request is against
107+
ci/scripts/changed_crates.sh semver-check "apache/${BASE_REF}" $PACKAGES \
106108
2>&1 | tee /tmp/semver-output.txt
107109
EXIT_CODE=${PIPESTATUS[0]}
108110
# Pass the result through an output instead of failing the job:

.github/workflows/breaking_changes_detector_comment.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ on:
5050
permissions:
5151
contents: read
5252

53+
# A dedicated label, separate from the existing `api change` label.
54+
# `api change` may be applied manually for behavioral changes that aren't
55+
# strictly API changes, so we can't safely auto-remove it when this check
56+
# passes. This auto-managed label is fully owned by the workflow.
57+
env:
58+
BREAKING_CHANGE_LABEL: "auto detected api change"
59+
5360
jobs:
5461
comment-on-pr:
5562
name: Comment on pull request
@@ -130,3 +137,24 @@ jobs:
130137
number: ${{ steps.read.outputs.pr_number }}
131138
body-include: '<!-- semver-check-comment -->'
132139
delete: true
140+
141+
- name: Add "auto detected api change" label
142+
if: steps.read.outputs.result != 'success'
143+
env:
144+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
145+
REPO: ${{ github.repository }}
146+
PR_NUMBER: ${{ steps.read.outputs.pr_number }}
147+
run: |
148+
gh pr edit "$PR_NUMBER" --repo "$REPO" \
149+
--add-label "$BREAKING_CHANGE_LABEL"
150+
151+
- name: Remove "auto detected api change" label
152+
if: steps.read.outputs.result == 'success'
153+
env:
154+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
155+
REPO: ${{ github.repository }}
156+
PR_NUMBER: ${{ steps.read.outputs.pr_number }}
157+
run: |
158+
# No-op when the label isn't currently applied.
159+
gh pr edit "$PR_NUMBER" --repo "$REPO" \
160+
--remove-label "$BREAKING_CHANGE_LABEL" || true

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ jobs:
4545
persist-credentials: false
4646

4747
- name: Initialize CodeQL
48-
uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
48+
uses: github/codeql-action/init@e46ed2cbd01164d986452f91f178727624ae40d7 # v4
4949
with:
5050
languages: actions
5151

5252
- name: Perform CodeQL Analysis
53-
uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
53+
uses: github/codeql-action/analyze@e46ed2cbd01164d986452f91f178727624ae40d7 # v4
5454
with:
5555
category: "/language:actions"

.github/workflows/dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
source ci/scripts/utils/tool_versions.sh
6565
echo "LYCHEE_VERSION=${LYCHEE_VERSION}" >> "$GITHUB_ENV"
6666
- name: Install lychee
67-
uses: taiki-e/install-action@481c34c1cf3a84c68b5e46f4eccfc82af798415a # v2.75.23
67+
uses: taiki-e/install-action@7ea35f098a7369cd23488403f58be9c491a6c55f # v2.77.0
6868
with:
6969
tool: lychee@${{ env.LYCHEE_VERSION }}
7070
- name: Run markdown link check

.github/workflows/extended.yml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -57,37 +57,9 @@ permissions:
5757
checks: write
5858

5959
jobs:
60-
61-
# Check crate compiles and base cargo check passes
62-
linux-build-lib:
63-
name: linux build test
64-
runs-on: ${{ github.repository_owner == 'apache' && format('runs-on={0},family=m8a+m7a+c8a,cpu=8,image=ubuntu24-full-x64,extras=s3-cache,disk=large,tag=datafusion', github.run_id) || 'ubuntu-latest' }}
65-
# note: do not use amd/rust container to preserve disk space
66-
steps:
67-
- uses: runs-on/action@742bf56072eb4845a0f94b3394673e4903c90ff0 # v2.1.0
68-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
69-
with:
70-
ref: ${{ github.event.inputs.pr_head_sha }} # will be empty if triggered by push
71-
submodules: true
72-
fetch-depth: 1
73-
- name: Install Rust
74-
run: |
75-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
76-
source $HOME/.cargo/env
77-
rustup toolchain install
78-
- name: Install Protobuf Compiler
79-
run: |
80-
sudo apt-get update
81-
sudo apt-get install -y protobuf-compiler
82-
- name: Prepare cargo build
83-
run: |
84-
cargo check --profile ci --all-targets
85-
cargo clean
86-
8760
# Run extended tests (with feature 'extended_tests')
8861
linux-test-extended:
8962
name: cargo test 'extended_tests' (amd64)
90-
needs: [linux-build-lib]
9163
runs-on: ${{ github.repository_owner == 'apache' && format('runs-on={0},family=m8a+m7a+c8a,cpu=32,image=ubuntu24-full-x64,extras=s3-cache,disk=large,tag=datafusion', github.run_id) || 'ubuntu-latest' }}
9264
# note: do not use amd/rust container to preserve disk space
9365
steps:

.github/workflows/rust.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,11 @@ on:
3333
- ".github/ISSUE_TEMPLATE/**"
3434
- ".github/pull_request_template.md"
3535
pull_request:
36-
paths-ignore:
37-
- "docs/**"
38-
- "**.md"
39-
- ".github/ISSUE_TEMPLATE/**"
40-
- ".github/pull_request_template.md"
4136
# manual trigger
4237
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
4338
workflow_dispatch:
39+
merge_group:
40+
4441

4542
permissions:
4643
contents: read
@@ -301,7 +298,6 @@ jobs:
301298
--profile ci \
302299
--exclude datafusion-examples \
303300
--exclude ffi_example_table_provider \
304-
--exclude datafusion-benchmarks \
305301
--exclude datafusion-cli \
306302
--workspace \
307303
--lib \
@@ -433,7 +429,7 @@ jobs:
433429
sudo apt-get update -qq
434430
sudo apt-get install -y -qq clang
435431
- name: Setup wasm-pack
436-
uses: taiki-e/install-action@481c34c1cf3a84c68b5e46f4eccfc82af798415a # v2.75.23
432+
uses: taiki-e/install-action@7ea35f098a7369cd23488403f58be9c491a6c55f # v2.77.0
437433
with:
438434
tool: wasm-pack
439435
- name: Run tests with headless mode
@@ -560,6 +556,11 @@ jobs:
560556
# export PATH=$PATH:$HOME/d/protoc/bin
561557
# cargo test --lib --tests --bins --features avro,json,backtrace
562558

559+
# macOS scope is narrowed to `datafusion-ffi`: the only bug class amd64
560+
# cannot reproduce is FFI cdylib loading (`.dylib` vs `.so` resolution in
561+
# datafusion/ffi/src/tests/utils.rs). All other macos-only failures
562+
# historically came from datafusion-benchmarks (now covered on amd64) or
563+
# flaky sqllogictest metrics.
563564
macos-aarch64:
564565
name: cargo test (macos-aarch64)
565566
runs-on: macos-15
@@ -570,9 +571,9 @@ jobs:
570571
fetch-depth: 1
571572
- name: Setup Rust toolchain
572573
uses: ./.github/actions/setup-macos-aarch64-builder
573-
- name: Run tests (excluding doctests)
574+
- name: Run datafusion-ffi tests
574575
shell: bash
575-
run: cargo test --profile ci --exclude datafusion-cli --workspace --lib --tests --bins --features avro,json,backtrace,integration-tests,substrait
576+
run: cargo test --profile ci -p datafusion-ffi --lib --tests --features integration-tests
576577

577578
vendor:
578579
name: Verify Vendored Code
@@ -773,7 +774,7 @@ jobs:
773774
- name: Setup Rust toolchain
774775
uses: ./.github/actions/setup-builder
775776
- name: Install cargo-msrv
776-
uses: taiki-e/install-action@481c34c1cf3a84c68b5e46f4eccfc82af798415a # v2.75.23
777+
uses: taiki-e/install-action@7ea35f098a7369cd23488403f58be9c491a6c55f # v2.77.0
777778
with:
778779
tool: cargo-msrv
779780

0 commit comments

Comments
 (0)