Skip to content

Commit b6aeee8

Browse files
authored
Merge branch 'main' into topk-mutable-borrow-slots
2 parents ddd9b71 + ab12f5e commit b6aeee8

36 files changed

Lines changed: 2079 additions & 246 deletions

File tree

‎.github/dependabot.yml‎

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,33 @@ updates:
6262
update-types:
6363
- "minor"
6464
- "patch"
65+
# dev/depcheck is a standalone crate excluded from the workspace, so it is
66+
# not covered by the workspace entry above
67+
- package-ecosystem: cargo
68+
directory: "/dev/depcheck"
69+
schedule:
70+
interval: weekly
71+
target-branch: main
72+
labels: [auto-dependencies]
73+
# the wasm test app has its own npm lockfile
74+
- package-ecosystem: npm
75+
directory: "/datafusion/wasmtest/datafusion-wasm-app"
76+
schedule:
77+
interval: weekly
78+
labels: [auto-dependencies]
79+
groups:
80+
# minor and patch bumps are grouped into a single PR
81+
all-npm-deps:
82+
applies-to: version-updates
83+
patterns:
84+
- "*"
85+
update-types:
86+
- "minor"
87+
- "patch"
6588
- package-ecosystem: "github-actions"
66-
directory: "/"
89+
# "/" covers workflows in .github/workflows; the glob covers composite
90+
# actions such as .github/actions/setup-builder
91+
directories: ["/", "/.github/actions/*"]
6792
schedule:
6893
interval: "weekly"
6994
open-pull-requests-limit: 10
@@ -72,8 +97,10 @@ updates:
7297
codeql-actions:
7398
patterns:
7499
- "github/codeql-action/*"
75-
- package-ecosystem: "pip"
76-
directory: "/docs"
100+
# Python dependencies are managed as a uv workspace rooted at the top-level
101+
# pyproject.toml with a shared uv.lock
102+
- package-ecosystem: "uv"
103+
directory: "/"
77104
schedule:
78105
interval: "weekly"
79106
labels: [auto-dependencies]

‎Cargo.toml‎

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,20 +210,71 @@ uuid = "1.23"
210210
zstd = { version = "0.13", default-features = false }
211211

212212
# Keep this list sorted alphabetically.
213+
# See https://github.com/apache/datafusion/issues/18467 for the ongoing effort of
214+
# picking useful non-default lints.
213215
[workspace.lints.clippy]
214216
# https://github.com/apache/datafusion/issues/18881
215217
allow_attributes = "warn"
218+
as_ptr_cast_mut = "warn"
216219
assigning_clones = "warn"
220+
clear_with_drain = "warn"
221+
coerce_container_to_any = "warn"
222+
debug_assert_with_mut_call = "warn"
223+
decimal_bitwise_operands = "warn"
224+
default_union_representation = "warn"
225+
doc_include_without_cfg = "warn"
226+
empty_enum_variants_with_brackets = "warn"
227+
exit = "warn"
228+
flat_map_option = "warn"
229+
fn_to_numeric_cast_any = "warn"
230+
imprecise_flops = "warn"
231+
index_refutable_slice = "warn"
217232
inefficient_to_string = "warn"
233+
infinite_loop = "warn"
234+
invalid_upcast_comparisons = "warn"
235+
ip_constant = "warn"
236+
iter_filter_is_ok = "warn"
237+
iter_filter_is_some = "warn"
238+
iter_on_empty_collections = "warn"
218239
# Detects large stack-allocated futures that may cause stack overflow crashes (see threshold in clippy.toml)
219240
large_futures = "warn"
241+
large_include_file = "warn"
242+
macro_use_imports = "warn"
243+
manual_ilog2 = "warn"
244+
manual_instant_elapsed = "warn"
245+
manual_is_power_of_two = "warn"
246+
match_wild_err_arm = "warn"
247+
mem_forget = "warn"
248+
mismatching_type_param_order = "warn"
249+
mut_mut = "warn"
220250
# https://github.com/apache/datafusion/issues/18503
221251
needless_pass_by_value = "warn"
252+
negative_feature_names = "warn"
253+
non_zero_suggestions = "warn"
254+
nonstandard_macro_braces = "warn"
222255
or_fun_call = "warn"
256+
path_buf_push_overwrite = "warn"
257+
pathbuf_init_then_push = "warn"
258+
precedence_bits = "warn"
259+
pub_underscore_fields = "warn"
260+
rc_mutex = "warn"
261+
ref_option_ref = "warn"
262+
same_length_and_capacity = "warn"
263+
str_split_at_newline = "warn"
264+
string_add_assign = "warn"
265+
suspicious_xor_used_as_pow = "warn"
266+
trailing_empty_array = "warn"
267+
transmute_ptr_to_ptr = "warn"
268+
uninhabited_references = "warn"
223269
uninlined_format_args = "warn"
224270
unnecessary_lazy_evaluations = "warn"
271+
unnecessary_self_imports = "warn"
225272
unused_async = "warn"
273+
unused_rounding = "warn"
226274
used_underscore_binding = "warn"
275+
verbose_file_reads = "warn"
276+
wildcard_dependencies = "warn"
277+
zero_sized_map_values = "warn"
227278

228279
[workspace.lints.rust]
229280
unexpected_cfgs = { level = "warn", check-cfg = [

‎benchmarks/src/clickbench.rs‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,7 @@ pub struct RunOpt {
111111

112112
/// Get the SQL file path
113113
pub fn get_query_path(query_dir: &Path, query: usize) -> PathBuf {
114-
let mut query_path = query_dir.to_path_buf();
115-
query_path.push(format!("q{query}.sql"));
116-
query_path
114+
query_dir.join(format!("q{query}.sql"))
117115
}
118116

119117
/// Get the SQL statement from the specified query file

‎datafusion-cli/src/lib.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
html_favicon_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg"
2121
)]
2222
#![cfg_attr(docsrs, feature(doc_cfg))]
23-
#![doc = include_str!("../README.md")]
23+
#![cfg_attr(doc, doc = include_str!("../README.md"))]
2424
pub const DATAFUSION_CLI_VERSION: &str = env!("CARGO_PKG_VERSION");
2525

2626
pub mod catalog;

‎datafusion/common/src/cse.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ mod test {
808808
) -> HashSet<u64> {
809809
id_array
810810
.iter_mut()
811-
.flat_map(|(_, id_option)| {
811+
.filter_map(|(_, id_option)| {
812812
id_option.as_mut().map(|node_id| {
813813
let hash = node_id.hash;
814814
node_id.hash = 0;

‎datafusion/common/src/utils/proxy.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ where
166166
if cfg!(debug_assertions) {
167167
// In debug mode, check that the element is not already present
168168
debug_assert!(
169-
self.find_entry(hash, |y| y == &x).is_err(),
169+
self.find(hash, |y| y == &x).is_none(),
170170
"attempted to insert duplicate element into HashTableAllocExt::insert_accounted"
171171
);
172172
}

‎datafusion/core/benches/parquet_query_sql.rs‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ use parquet::file::properties::{WriterProperties, WriterVersion};
3232
use rand::distr::Alphanumeric;
3333
use rand::distr::uniform::SampleUniform;
3434
use rand::prelude::*;
35-
use std::fs::File;
36-
use std::io::Read;
3735
use std::ops::Range;
3836
use std::path::Path;
3937
use std::sync::Arc;
@@ -211,9 +209,7 @@ fn criterion_benchmark(c: &mut Criterion) {
211209
.unwrap();
212210

213211
// We read the queries from a file so they can be changed without recompiling the benchmark
214-
let mut queries_file = File::open("benches/parquet_query_sql.sql").unwrap();
215-
let mut queries = String::new();
216-
queries_file.read_to_string(&mut queries).unwrap();
212+
let queries = std::fs::read_to_string("benches/parquet_query_sql.sql").unwrap();
217213

218214
for query in queries.split(';') {
219215
let query = query.trim();

‎datafusion/core/src/lib.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@
761761
//! [`RecordBatch`]: arrow::array::RecordBatch
762762
//! [`RecordBatchReader`]: arrow::record_batch::RecordBatchReader
763763
//! [`Array`]: arrow::array::Array
764-
#![doc = include_str!("optimizer_rule_reference.md")]
764+
#![cfg_attr(doc, doc = include_str!("optimizer_rule_reference.md"))]
765765

766766
extern crate core;
767767
#[cfg(feature = "sql")]

‎datafusion/core/tests/fuzz_cases/spilling_fuzz_in_memory_constrained_env.rs‎

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -373,16 +373,15 @@ async fn run_sort_preserving_merge_peak_memory_with_spilled_input(
373373
let mut partition_batches: Vec<Vec<RecordBatch>> = Vec::new();
374374

375375
for stream_idx in 0..2usize {
376-
// Each stream covers a non-overlapping key range so both are individually
377-
// sorted: stream 0 → [0, 1000), stream 1 → [1000, 2000). When
378-
// `tied_values` is set, every row of every batch in both streams
379-
// instead carries the same sort key, so every comparison between the
380-
// two streams is a tie.
376+
// When `tied_values` is false, each stream covers a non-overlapping key range so both are
377+
// individually sorted:
378+
// stream 0 → [[0, 100), [200, 300),...]
379+
// stream 1 → [[100, 200), [300, 400), ...]
380+
//
381+
// When `tied_values` is set, every row of every batch in both streams instead carries the
382+
// same sort key, so every comparison between the two streams is a tie.
381383
let batches: Vec<RecordBatch> = (0..num_batches)
382384
.map(|b| {
383-
// Interleave streams: stream 0 → even slots [0,200,400,...],
384-
// stream 1 → odd slots [100,300,500,...] so the merge
385-
// alternates between them on every batch.
386385
let base = ((b * 2 + stream_idx) * num_rows_per_batch) as i32;
387386
let sort_col: Int32Array = if tied_values {
388387
std::iter::repeat_n(0, num_rows_per_batch).collect()
@@ -524,13 +523,7 @@ async fn run_sort_preserving_merge_peak_memory_with_spilled_input(
524523
// BatchBuilder needs to hold 3 Record batches simultaneously to merge two
525524
// streams (because a stream can cross a record batch boundary)
526525
// there is also one cursor needed per stream
527-
let mut max_peak = 3 * ipc_batch_size + 2 * cursor_unit + converter_size;
528-
529-
// with round robin enabled, 2 extra cursors live in memory
530-
// see https://github.com/apache/datafusion/issues/23604
531-
if round_robin {
532-
max_peak += 2 * cursor_unit;
533-
};
526+
let max_peak = 3 * ipc_batch_size + 2 * cursor_unit + converter_size;
534527

535528
assert!(
536529
peak_bytes > 0,

‎datafusion/core/tests/physical_optimizer/pushdown_utils.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ pub fn format_execution_plan(plan: &Arc<dyn ExecutionPlan>) -> Vec<String> {
434434
}
435435

436436
fn format_lines(s: &str) -> Vec<String> {
437-
s.trim().split('\n').map(|s| s.to_string()).collect()
437+
s.trim().lines().map(|s| s.to_string()).collect()
438438
}
439439

440440
pub fn format_plan_for_test(plan: &Arc<dyn ExecutionPlan>) -> String {

0 commit comments

Comments
 (0)