Skip to content

Commit 3f50082

Browse files
authored
Merge branch 'main' into fix/24998-reject-delete-limit
2 parents ae0f716 + 9951f0b commit 3f50082

544 files changed

Lines changed: 42683 additions & 7353 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.

‎.ai/skills/add-benchmarks/SKILL.md‎

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
name: add-benchmarks
3+
description: Guidelines for designing or extending DataFusion benchmarks.
4+
---
5+
6+
# Benchmark Design
7+
8+
Follow these guidelines when designing or adding a new benchmark.
9+
10+
## Design principles
11+
12+
### Use the highest-level interface
13+
14+
Use the highest-level interface possible, preferably SQL, while keeping the work
15+
around the operator being measured as cheap as possible. When benchmarking a
16+
function, exercise its evaluation path instead of benchmarking internal utility
17+
functions in isolation.
18+
19+
This makes benchmarks easier to maintain and helps assess how much an optimization
20+
matters to end-to-end runtime. It also helps avoid spending time optimizing code
21+
that accounts for only a small fraction of the total runtime.
22+
23+
Practical criteria for choosing SQL or Rust benchmarks: Try implementing the benchmark in SQL first. If a Rust microbenchmark still seems like a better fit, use Criterion.
24+
25+
### Vary the key workload axes
26+
27+
First identify the key axes to vary. For example, for a join benchmark:
28+
29+
- Input size on each side.
30+
- Join-filter selectivity.
31+
- ...
32+
33+
Then choose benchmark cases that exercise representative variations. Full
34+
combinatorial coverage is unnecessary; focus on typical workloads that reflect
35+
real use cases.
36+
37+
When adding benchmark queries, simply tag each query with the decision made
38+
for every axis. For example, for a join benchmark with input sizes/filter selectivity
39+
to tune:
40+
41+
```sql
42+
-- Q1: Small left input, large right input; 0.1% of pairs match.
43+
SELECT *
44+
FROM generate_series(1, 100) AS l
45+
JOIN generate_series(1, 100000) AS r
46+
ON (l.value + r.value) % 1000 = 0;
47+
48+
-- Q2: Medium inputs on both sides; no filter.
49+
SELECT *
50+
FROM generate_series(1, 1000) AS l
51+
CROSS JOIN generate_series(1, 1000) AS r;
52+
```
53+
54+
## SQL benchmarks
55+
56+
For implementation details, see the
57+
[SQL benchmark README](../../../benchmarks/sql_benchmarks/README.md).
58+
59+
1. **Keep other operators cheap.**
60+
61+
When a SQL benchmark targets a specific operator, keep the work done by
62+
other operators as lightweight as possible. For example, use a data source
63+
such as `generate_series()` instead of a Parquet scan so scan overhead does
64+
not dominate the measurement. See the [`nlj` benchmark](../../../benchmarks/sql_benchmarks/nlj/) for examples.
65+
66+
2. **Integrate with the top-level benchmark script.**
67+
68+
Ensure the benchmark can be prepared and run through `bench.sh`:
69+
70+
```bash
71+
# Run from the benchmarks directory.
72+
73+
# Generate any required dataset.
74+
./bench.sh data new_bench
75+
76+
# Run the benchmark.
77+
./bench.sh run new_bench
78+
```
79+
80+
3. **Keep query runtimes practical.**
81+
82+
Tune the workload so each query takes roughly a few seconds per execution.
83+
This helps reduce the relative impact of timing noise while keeping the
84+
suite practical to run.

‎.github/workflows/audit.yml‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,8 @@ jobs:
4545
steps:
4646
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
4747
- name: Install cargo-audit
48-
uses: taiki-e/install-action@7b8d4719ee4aaa279bdf55df38dacb9ebfe12a6c # v2.87.6
48+
uses: taiki-e/install-action@9114bf4d891761788c546334fd37538eae1bf8b3 # v2.87.16
4949
with:
5050
tool: cargo-audit
5151
- name: Run audit check
52-
# Note: you can ignore specific RUSTSEC issues using the `--ignore` flag ,for example:
53-
# run: cargo audit --ignore RUSTSEC-2026-0001
54-
# TODO: remove once object_store upgrades to quick-xml >= 0.41.0
55-
# https://github.com/apache/datafusion/issues/23297
56-
run: cargo audit --ignore RUSTSEC-2026-0194 --ignore RUSTSEC-2026-0195
52+
run: bash ci/scripts/security_audit.sh

‎.github/workflows/breaking_changes_detector.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
9090
- name: Install cargo-semver-checks
9191
if: steps.changed_crates.outputs.packages != ''
92-
uses: taiki-e/install-action@7b8d4719ee4aaa279bdf55df38dacb9ebfe12a6c # v2.87.6
92+
uses: taiki-e/install-action@9114bf4d891761788c546334fd37538eae1bf8b3 # v2.87.16
9393
with:
9494
tool: cargo-semver-checks
9595

‎.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@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4
48+
uses: github/codeql-action/init@1c5b675653bb5c22dbe9b12b556ec555138e09fd # v4
4949
with:
5050
languages: actions
5151

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

‎.github/workflows/dependencies.yml‎

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ concurrency:
2424
on:
2525
push:
2626
branches-ignore:
27+
# Commits reach main through the merge queue, which runs this workflow at
28+
# the same SHA, so do not repeat the jobs after the merge. Release
29+
# branches and every other branch keep their post-push runs.
30+
- 'main'
2731
- 'gh-readonly-queue/**'
2832
- 'dependabot/**'
2933
pull_request:
@@ -51,9 +55,7 @@ jobs:
5155
with:
5256
rust-version: stable
5357
- name: Check dependencies
54-
working-directory: dev/depcheck
55-
run: |
56-
cargo run --locked
58+
run: bash ci/scripts/check_circular_dependencies.sh
5759

5860
detect-unused-dependencies:
5961
name: Detect Unused Dependencies
@@ -62,9 +64,13 @@ jobs:
6264
image: amd64/rust
6365
steps:
6466
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
67+
- name: Load tool versions
68+
run: |
69+
. ci/scripts/utils/tool_versions.sh
70+
echo "CARGO_MACHETE_VERSION=${CARGO_MACHETE_VERSION}" >> "$GITHUB_ENV"
6571
- name: Install cargo-machete
66-
uses: taiki-e/install-action@7b8d4719ee4aaa279bdf55df38dacb9ebfe12a6c # v2.87.6
72+
uses: taiki-e/install-action@9114bf4d891761788c546334fd37538eae1bf8b3 # v2.87.16
6773
with:
68-
tool: cargo-machete@0.9
74+
tool: cargo-machete@${{ env.CARGO_MACHETE_VERSION }}
6975
- name: Detect unused dependencies
70-
run: cargo machete --with-metadata
76+
run: bash ci/scripts/check_unused_dependencies.sh

‎.github/workflows/dev.yml‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ name: Dev
1919
on:
2020
push:
2121
branches-ignore:
22+
# Commits reach main through the merge queue, which runs this workflow at
23+
# the same SHA, so do not repeat the jobs after the merge. Release
24+
# branches and every other branch keep their post-push runs.
25+
- 'main'
2226
- 'gh-readonly-queue/**'
2327
- 'dependabot/**'
2428
pull_request:
@@ -38,7 +42,7 @@ jobs:
3842
steps:
3943
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
4044
- name: Install HawkEye
41-
uses: taiki-e/install-action@7b8d4719ee4aaa279bdf55df38dacb9ebfe12a6c # v2.87.6
45+
uses: taiki-e/install-action@9114bf4d891761788c546334fd37538eae1bf8b3 # v2.87.16
4246
with:
4347
tool: hawkeye@7.0.0
4448
- name: Run license header check
@@ -66,7 +70,7 @@ jobs:
6670
source ci/scripts/utils/tool_versions.sh
6771
echo "LYCHEE_VERSION=${LYCHEE_VERSION}" >> "$GITHUB_ENV"
6872
- name: Install lychee
69-
uses: taiki-e/install-action@7b8d4719ee4aaa279bdf55df38dacb9ebfe12a6c # v2.87.6
73+
uses: taiki-e/install-action@9114bf4d891761788c546334fd37538eae1bf8b3 # v2.87.16
7074
with:
7175
tool: lychee@${{ env.LYCHEE_VERSION }}
7276
- name: Run markdown link check
@@ -91,7 +95,7 @@ jobs:
9195
# it may cause checks to fail more often.
9296
# We can upgrade it manually once a while.
9397
- name: Install typos
94-
uses: taiki-e/install-action@7b8d4719ee4aaa279bdf55df38dacb9ebfe12a6c # v2.87.6
98+
uses: taiki-e/install-action@9114bf4d891761788c546334fd37538eae1bf8b3 # v2.87.16
9599
with:
96100
tool: typos@1.37.0
97101
- name: Run typos check

‎.github/workflows/docs.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
path: asf-site
4444

4545
- name: Setup uv
46-
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
46+
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
4747

4848
- name: Install dependencies
4949
run: uv sync --package datafusion-docs
@@ -53,7 +53,7 @@ jobs:
5353
sudo apt-get update
5454
sudo apt-get install -y graphviz
5555
- name: Install cargo-depgraph
56-
uses: taiki-e/install-action@7b8d4719ee4aaa279bdf55df38dacb9ebfe12a6c # v2.87.6
56+
uses: taiki-e/install-action@9114bf4d891761788c546334fd37538eae1bf8b3 # v2.87.16
5757
with:
5858
tool: cargo-depgraph@1.6
5959

‎.github/workflows/docs_pr.yaml‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@ on:
2626
push:
2727
paths:
2828
- "docs/**"
29+
- "ci/scripts/check_docs_html.sh"
2930
branches:
3031
- main
3132
- branch-*
3233
pull_request:
3334
paths:
3435
- "docs/**"
36+
- "ci/scripts/check_docs_html.sh"
3537
# manual trigger
3638
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
3739
workflow_dispatch:
@@ -50,7 +52,7 @@ jobs:
5052
submodules: true
5153
fetch-depth: 1
5254
- name: Setup uv
53-
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
55+
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
5456
- name: Install doc dependencies
5557
run: uv sync --package datafusion-docs
5658
- name: Install Graphviz
@@ -59,11 +61,8 @@ jobs:
5961
sudo apt-get update
6062
sudo apt-get install -y graphviz
6163
- name: Install cargo-depgraph
62-
uses: taiki-e/install-action@7b8d4719ee4aaa279bdf55df38dacb9ebfe12a6c # v2.87.6
64+
uses: taiki-e/install-action@9114bf4d891761788c546334fd37538eae1bf8b3 # v2.87.16
6365
with:
6466
tool: cargo-depgraph@1.6
6567
- name: Build docs html and check for warnings
66-
run: |
67-
set -x
68-
cd docs
69-
uv run --package datafusion-docs ./build.sh # fails on errors
68+
run: ./ci/scripts/check_docs_html.sh # fails on errors

‎.github/workflows/extended.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
submodules: true
6868
fetch-depth: 1
6969
- name: Free Disk Space (Ubuntu)
70-
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
70+
uses: jlumbroso/free-disk-space@ceedf095f4ec1a097402bc6bd80831f2e1a6fde6 # v2.0.0
7171
- parallel:
7272
- name: Install Rust
7373
run: |

‎.github/workflows/large_files.yml‎

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ jobs:
3636
with:
3737
fetch-depth: 0
3838
- name: Check size of new Git objects
39-
env:
40-
# 1.5 MB ought to be enough for anybody.
41-
# TODO in case we may want to consciously commit a bigger file to the repo without using Git LFS we may disable the check e.g. with a label
42-
MAX_FILE_SIZE_BYTES: 1572864
4339
shell: bash
4440
run: |
4541
if [ "${{ github.event_name }}" = "merge_group" ]; then
@@ -51,18 +47,4 @@ jobs:
5147
base_sha="${{ github.event.pull_request.base.sha }}"
5248
head_sha="${{ github.event.pull_request.head.sha }}"
5349
fi
54-
git rev-list --objects ${base_sha}..${head_sha} \
55-
> pull-request-objects.txt
56-
exit_code=0
57-
while read -r id path; do
58-
# Skip objects which are not files (commits, trees)
59-
if [ ! -z "${path}" ]; then
60-
size="$(git cat-file -s "${id}")"
61-
if [ "${size}" -gt "${MAX_FILE_SIZE_BYTES}" ]; then
62-
exit_code=1
63-
echo "Object ${id} [${path}] has size ${size}, exceeding ${MAX_FILE_SIZE_BYTES} limit." >&2
64-
echo "::error file=${path}::File ${path} has size ${size}, exceeding ${MAX_FILE_SIZE_BYTES} limit."
65-
fi
66-
fi
67-
done < pull-request-objects.txt
68-
exit "${exit_code}"
50+
./ci/scripts/check_large_files.sh --base "${base_sha}" --head "${head_sha}"

0 commit comments

Comments
 (0)