Skip to content

Commit 05bcf90

Browse files
authored
Merge branch 'main' into rich-T-kid/faster-dict-hash
2 parents 71a7ca5 + 1c49b7f commit 05bcf90

1,753 files changed

Lines changed: 176770 additions & 29848 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.

‎.asf.yaml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ github:
6868
- "cargo check datafusion-functions features"
6969
- "cargo check datafusion-spark features"
7070
- "cargo test (amd64)"
71+
- "cargo test 'extended_tests' (amd64)"
72+
- "cargo test hash collisions (amd64)"
7173
- "cargo test datafusion-cli (amd64)"
7274
- "cargo examples (amd64)"
7375
- "cargo test doc (amd64)"
@@ -76,6 +78,7 @@ github:
7678
- "verify benchmark results (amd64)"
7779
- "Run sqllogictest with Postgres runner"
7880
- "Run sqllogictest in Substrait round-trip mode"
81+
- "Run sqllogictests with the sqlite test suite"
7982
- "cargo test (macos-aarch64)"
8083
- "Verify Vendored Code"
8184
- "Check cargo fmt"
@@ -84,6 +87,7 @@ github:
8487
- "check Cargo.toml formatting"
8588
- "check configs.md and ***_functions.md is up-to-date"
8689
- "check example README is up-to-date"
90+
- "Check datafusion crates used in datafusion-examples"
8791
- "Verify MSRV (Min Supported Rust Version)"
8892
# needs to be updated as part of the release process
8993
# .asf.yaml doesn't support wildcard branch protection rules, only exact branch names
@@ -114,6 +118,13 @@ github:
114118
allow_auto_merge: true
115119
# auto-delete head branches after being merged
116120
del_branch_on_merge: true
121+
# Limit open pull requests per user without write access.
122+
#
123+
# With coding agents, the number of open PRs now far exceeds our review capacity.
124+
# Setting a limit helps reviewers focus on fewer PRs at a time.
125+
creation_cap:
126+
enabled: true
127+
max_open_pull_requests: 3
117128

118129
# publishes the content of the `asf-site` branch to
119130
# https://datafusion.apache.org/

‎.cargo/config.toml‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +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+
18+
[alias]
19+
xtask = "run --quiet --locked --package datafusion-xtask --"
20+
ci-step = "run --quiet --locked --package datafusion-xtask -- ci step"

‎.envrc‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
source_up_if_exists
2+
if command -v nix >/dev/null 2>&1; then
3+
use flake
4+
fi
5+
source_env_if_exists .envrc.local

‎.github/ISSUE_TEMPLATE/bug_report.yml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,12 @@ body:
2626
label: Additional context
2727
placeholder: >
2828
Add any other context about the problem here.
29+
- type: dropdown
30+
attributes:
31+
label: Willingness to contribute
32+
description: >
33+
The Apache DataFusion community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the Apache DataFusion codebase?
34+
options:
35+
- I plan to contribute a fix for this bug independently
36+
- I would like to contribute a fix for this bug, but request guidance from the DataFusion community
37+
- I cannot contribute a fix for this bug at this time

‎.github/ISSUE_TEMPLATE/feature_request.yml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,12 @@ body:
2525
label: Additional context
2626
placeholder: >
2727
Add any other context or screenshots about the feature request here.
28+
- type: dropdown
29+
attributes:
30+
label: Willingness to contribute
31+
description: >
32+
The Apache DataFusion community encourages feature contributions. Would you or another member of your organization be willing to contribute to this feature for the Apache DataFusion codebase?
33+
options:
34+
- I plan to contribute to this feature independently
35+
- I would like to contribute to this feature, but request guidance from the DataFusion community
36+
- I cannot contribute to this feature at this time

‎.github/pull_request_template.md‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,18 @@ nulls" is the user-visible problem.
2626
There is no need to duplicate the description in the issue here, but it is sometimes worth providing a summary of the individual changes in this PR.
2727
-->
2828

29-
## Are these changes tested?
29+
## What is the testing strategy for this PR?
3030

3131
<!--
3232
We typically require tests for all PRs in order to:
3333
1. Prevent the code from being accidentally broken by subsequent changes
3434
2. Serve as another way to document the expected behavior of the code
3535
36-
If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
36+
Briefly describe how this PR is tested, and point to the specific tests you added. For example: 'This new feature is covered by the `sqllogictest` cases added in `foo.slt`'.
37+
38+
If this PR does not add tests, explain why. For example, if the change is already covered by existing tests, please mention it.
39+
40+
You should also check the `codecov` bot reply on this PR to confirm the changed code is exercised.
3741
-->
3842

3943
## Are there any user-facing changes?

‎.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@288e746965032cfcc232e09af2daf5f23c14d780 # v2.86.1
48+
uses: taiki-e/install-action@861a07ce7084f55488e375df125cdc99bba60eb7 # v2.87.23
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@288e746965032cfcc232e09af2daf5f23c14d780 # v2.86.1
92+
uses: taiki-e/install-action@861a07ce7084f55488e375df125cdc99bba60eb7 # v2.87.23
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@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4
48+
uses: github/codeql-action/init@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4
4949
with:
5050
languages: actions
5151

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

0 commit comments

Comments
 (0)