Skip to content

Commit 03aec69

Browse files
authored
set msrv via Cargo.toml, use 2024 edition (#152)
* bump edititon, rust version * leave at 1.85.1
1 parent a8597a0 commit 03aec69

30 files changed

+78
-69
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ datafusion-proto = { version = "49.0.0" }
88
[package]
99
name = "datafusion-distributed"
1010
version = "0.1.0"
11-
edition = "2021"
11+
edition = "2024"
1212

1313
[dependencies]
1414
chrono = { version = "0.4.42" }

benchmarks/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "datafusion-distributed-benchmarks"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55
default-run = "dfbench"
66

77
[dependencies]

benchmarks/src/tpch/convert.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ use std::path::{Path, PathBuf};
2222

2323
use datafusion::common::not_impl_err;
2424

25-
use super::get_tbl_tpch_table_schema;
2625
use super::TPCH_TABLES;
26+
use super::get_tbl_tpch_table_schema;
2727
use datafusion::error::Result;
2828
use datafusion::prelude::*;
2929
use parquet::basic::Compression;

benchmarks/src/tpch/run.rs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
// under the License.
1717

1818
use super::{
19-
get_query_sql, get_tbl_tpch_table_schema, get_tpch_table_schema, TPCH_QUERY_END_ID,
20-
TPCH_QUERY_START_ID, TPCH_TABLES,
19+
TPCH_QUERY_END_ID, TPCH_QUERY_START_ID, TPCH_TABLES, get_query_sql, get_tbl_tpch_table_schema,
20+
get_tpch_table_schema,
2121
};
2222
use crate::util::{
2323
BenchmarkRun, CommonOpt, InMemoryCacheExecCodec, InMemoryDataSourceRule, QueryIter,
@@ -29,21 +29,21 @@ use datafusion::arrow::util::pretty::pretty_format_batches;
2929
use datafusion::common::instant::Instant;
3030
use datafusion::common::tree_node::{Transformed, TreeNode};
3131
use datafusion::common::utils::get_available_parallelism;
32-
use datafusion::common::{exec_err, DEFAULT_CSV_EXTENSION, DEFAULT_PARQUET_EXTENSION};
32+
use datafusion::common::{DEFAULT_CSV_EXTENSION, DEFAULT_PARQUET_EXTENSION, exec_err};
33+
use datafusion::datasource::TableProvider;
34+
use datafusion::datasource::file_format::FileFormat;
3335
use datafusion::datasource::file_format::csv::CsvFormat;
3436
use datafusion::datasource::file_format::parquet::ParquetFormat;
35-
use datafusion::datasource::file_format::FileFormat;
3637
use datafusion::datasource::listing::{
3738
ListingOptions, ListingTable, ListingTableConfig, ListingTableUrl,
3839
};
39-
use datafusion::datasource::TableProvider;
4040
use datafusion::error::{DataFusionError, Result};
4141
use datafusion::execution::{SessionState, SessionStateBuilder};
4242
use datafusion::physical_plan::display::DisplayableExecutionPlan;
4343
use datafusion::physical_plan::{collect, displayable};
4444
use datafusion::prelude::*;
4545
use datafusion_distributed::test_utils::localhost::{
46-
spawn_flight_service, LocalHostChannelResolver,
46+
LocalHostChannelResolver, spawn_flight_service,
4747
};
4848
use datafusion_distributed::{
4949
DistributedExt, DistributedPhysicalOptimizerRule, DistributedSessionBuilder,
@@ -354,11 +354,15 @@ impl RunOpt {
354354
let data_path = crate_path.join("data");
355355
let entries = fs::read_dir(&data_path)?.collect::<Result<Vec<_>, _>>()?;
356356
if entries.is_empty() {
357-
exec_err!("No TPCH dataset present in '{data_path:?}'. Generate one with ./benchmarks/gen-tpch.sh")
357+
exec_err!(
358+
"No TPCH dataset present in '{data_path:?}'. Generate one with ./benchmarks/gen-tpch.sh"
359+
)
358360
} else if entries.len() == 1 {
359361
Ok(entries[0].path())
360362
} else {
361-
exec_err!("Multiple TPCH datasets present in '{data_path:?}'. One must be selected with --path")
363+
exec_err!(
364+
"Multiple TPCH datasets present in '{data_path:?}'. One must be selected with --path"
365+
)
362366
}
363367
}
364368

benchmarks/src/util/memory.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use datafusion::execution::{FunctionRegistry, SendableRecordBatchStream, TaskCon
88
use datafusion::physical_optimizer::PhysicalOptimizerRule;
99
use datafusion::physical_plan::stream::RecordBatchStreamAdapter;
1010
use datafusion::physical_plan::{
11-
displayable, DisplayAs, DisplayFormatType, ExecutionPlan, PlanProperties,
11+
DisplayAs, DisplayFormatType, ExecutionPlan, PlanProperties, displayable,
1212
};
1313
use datafusion_proto::physical_plan::PhysicalExtensionCodec;
1414
use futures::{FutureExt, StreamExt};

benchmarks/src/util/options.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ impl CommonOpt {
105105
return Err(DataFusionError::Configuration(format!(
106106
"Invalid memory pool type: {}",
107107
self.mem_pool_type
108-
)))
108+
)));
109109
}
110110
};
111111
rt_builder = rt_builder

benchmarks/src/util/run.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
use chrono::{DateTime, Utc};
1919
use datafusion::common::utils::get_available_parallelism;
20-
use datafusion::{error::Result, DATAFUSION_VERSION};
20+
use datafusion::{DATAFUSION_VERSION, error::Result};
2121
use serde::{Deserialize, Deserializer, Serialize, Serializer};
2222
use std::{
2323
path::Path,

src/common/ttl_map.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ use dashmap::{DashMap, Entry};
2727
use datafusion::error::DataFusionError;
2828
use std::collections::HashSet;
2929
use std::hash::Hash;
30+
use std::sync::Arc;
3031
use std::sync::atomic::AtomicU64;
3132
#[cfg(test)]
3233
use std::sync::atomic::{AtomicUsize, Ordering::Relaxed};
33-
use std::sync::Arc;
3434
use std::time::Duration;
3535
use tokio::sync::mpsc::{UnboundedReceiver, UnboundedSender};
3636

@@ -289,7 +289,7 @@ where
289289
mod tests {
290290
use super::*;
291291
use std::sync::atomic::Ordering;
292-
use tokio::time::{sleep, Duration};
292+
use tokio::time::{Duration, sleep};
293293

294294
#[tokio::test]
295295
async fn test_basic_insert_and_get() {

src/config_extension_ext.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use datafusion::common::{internal_datafusion_err, DataFusionError};
1+
use datafusion::common::{DataFusionError, internal_datafusion_err};
22
use datafusion::config::ConfigExtension;
33
use datafusion::execution::TaskContext;
44
use datafusion::prelude::SessionConfig;
@@ -94,8 +94,8 @@ impl ContextGrpcMetadata {
9494
#[cfg(test)]
9595
mod tests {
9696
use crate::config_extension_ext::{
97-
set_distributed_option_extension, set_distributed_option_extension_from_headers,
98-
ContextGrpcMetadata,
97+
ContextGrpcMetadata, set_distributed_option_extension,
98+
set_distributed_option_extension_from_headers,
9999
};
100100
use datafusion::common::extensions_options;
101101
use datafusion::config::ConfigExtension;

src/distributed_ext.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
use crate::ChannelResolver;
12
use crate::channel_resolver_ext::set_distributed_channel_resolver;
23
use crate::config_extension_ext::{
34
set_distributed_option_extension, set_distributed_option_extension_from_headers,
45
};
56
use crate::protobuf::set_distributed_user_codec;
6-
use crate::ChannelResolver;
77
use datafusion::common::DataFusionError;
88
use datafusion::config::ConfigExtension;
99
use datafusion::execution::{SessionState, SessionStateBuilder};

0 commit comments

Comments
 (0)