Skip to content

Commit fc37302

Browse files
committed
un-deprecate to minimize diff
1 parent d7284e3 commit fc37302

File tree

7 files changed

+1
-24
lines changed

7 files changed

+1
-24
lines changed

datafusion/catalog/src/memory/table.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ impl MemTable {
138138
) -> Result<Self> {
139139
let schema = t.schema();
140140
let constraints = t.constraints();
141-
#[expect(deprecated)]
142141
let exec = t.scan(state, None, &[], None).await?;
143142
let partition_count = exec.output_partitioning().partition_count();
144143

datafusion/catalog/src/table.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ pub trait TableProvider: Debug + Sync + Send {
164164
/// because inexact filters do not guarantee that every filtered row is
165165
/// removed, so applying the limit could lead to too few rows being available
166166
/// to return as a final result.
167-
#[deprecated(since = "50.0.0", note = "Use `scan_with_args` instead")]
168167
async fn scan(
169168
&self,
170169
state: &dyn Session,
@@ -195,7 +194,6 @@ pub trait TableProvider: Debug + Sync + Send {
195194
TableProviderFilterPushDown::Exact => None,
196195
})
197196
.collect_vec();
198-
#[expect(deprecated)]
199197
let plan = self
200198
.scan(state, projection.as_ref(), &filters, limit)
201199
.await?;
@@ -381,6 +379,7 @@ pub struct ScanResult {
381379
/// The ExecutionPlan to run.
382380
plan: Arc<dyn ExecutionPlan>,
383381
// Remaining filters that were not completely evaluated during `scan_with_args()`.
382+
// These were previously referred to as "unsupported filters" or "inexact filters".
384383
filters: Vec<Expr>,
385384
}
386385

datafusion/core/src/datasource/listing/table.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1696,7 +1696,6 @@ mod tests {
16961696

16971697
let table = load_table(&ctx, "alltypes_plain.parquet").await?;
16981698
let projection = None;
1699-
#[expect(deprecated)]
17001699
let exec = table
17011700
.scan(&ctx.state(), projection, &[], None)
17021701
.await
@@ -1834,7 +1833,6 @@ mod tests {
18341833
// this will filter out the only file in the store
18351834
let filter = Expr::not_eq(col("p1"), lit("v1"));
18361835

1837-
#[expect(deprecated)]
18381836
let scan = table
18391837
.scan(&ctx.state(), None, &[filter], None)
18401838
.await
@@ -2735,7 +2733,6 @@ mod tests {
27352733
.with_schema(schema_default);
27362734
let table_default = ListingTable::try_new(config_default)?;
27372735

2738-
#[expect(deprecated)]
27392736
let exec_default = table_default.scan(&state, None, &[], None).await?;
27402737
assert_eq!(
27412738
exec_default.partition_statistics(None)?.num_rows,
@@ -2757,7 +2754,6 @@ mod tests {
27572754
.with_schema(schema_disabled);
27582755
let table_disabled = ListingTable::try_new(config_disabled)?;
27592756

2760-
#[expect(deprecated)]
27612757
let exec_disabled = table_disabled.scan(&state, None, &[], None).await?;
27622758
assert_eq!(
27632759
exec_disabled.partition_statistics(None)?.num_rows,
@@ -2777,7 +2773,6 @@ mod tests {
27772773
.with_schema(schema_enabled);
27782774
let table_enabled = ListingTable::try_new(config_enabled)?;
27792775

2780-
#[expect(deprecated)]
27812776
let exec_enabled = table_enabled.scan(&state, None, &[], None).await?;
27822777
assert_eq!(
27832778
exec_enabled.partition_statistics(None)?.num_rows,
@@ -2884,7 +2879,6 @@ mod tests {
28842879
assert!(table.schema_adapter_factory().is_none());
28852880

28862881
// The scan should work correctly with the default schema adapter
2887-
#[expect(deprecated)]
28882882
let scan_result = table.scan(&ctx.state(), None, &[], None).await;
28892883
assert!(
28902884
scan_result.is_ok(),
@@ -2921,7 +2915,6 @@ mod tests {
29212915
)?;
29222916

29232917
// The error should bubble up from the scan operation when schema mapping fails
2924-
#[expect(deprecated)]
29252918
let scan_result = table.scan(&ctx.state(), None, &[], None).await;
29262919

29272920
assert!(scan_result.is_err());

datafusion/core/src/datasource/memory_test.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ mod tests {
5959
let provider = MemTable::try_new(schema, vec![vec![batch]])?;
6060

6161
// scan with projection
62-
#[expect(deprecated)]
6362
let exec = provider
6463
.scan(&session_ctx.state(), Some(&vec![2, 1]), &[], None)
6564
.await?;
@@ -95,7 +94,6 @@ mod tests {
9594

9695
let provider = MemTable::try_new(schema, vec![vec![batch]])?;
9796

98-
#[expect(deprecated)]
9997
let exec = provider.scan(&session_ctx.state(), None, &[], None).await?;
10098
let mut it = exec.execute(0, task_ctx)?;
10199
let batch1 = it.next().await.unwrap()?;
@@ -128,7 +126,6 @@ mod tests {
128126

129127
let projection: Vec<usize> = vec![0, 4];
130128

131-
#[expect(deprecated)]
132129
match provider
133130
.scan(&session_ctx.state(), Some(&projection), &[], None)
134131
.await
@@ -257,7 +254,6 @@ mod tests {
257254
let provider =
258255
MemTable::try_new(Arc::new(merged_schema), vec![vec![batch1, batch2]])?;
259256

260-
#[expect(deprecated)]
261257
let exec = provider.scan(&session_ctx.state(), None, &[], None).await?;
262258
let mut it = exec.execute(0, task_ctx)?;
263259
let batch1 = it.next().await.unwrap()?;

datafusion/core/tests/parquet/file_statistics.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ async fn check_stats_precision_with_filter_pushdown() {
6060
options.execution.parquet.pushdown_filters = true;
6161

6262
// Scan without filter, stats are exact
63-
#[expect(deprecated)]
6463
let exec = table.scan(&state, None, &[], None).await.unwrap();
6564
assert_eq!(
6665
exec.partition_statistics(None).unwrap().num_rows,
@@ -72,7 +71,6 @@ async fn check_stats_precision_with_filter_pushdown() {
7271
// (it is not a partition filter). Therefore; it will be pushed down to the
7372
// source operator after the appropriate optimizer pass.
7473
let filter_expr = Expr::gt(col("id"), lit(1));
75-
#[expect(deprecated)]
7674
let exec_with_filter = table
7775
.scan(&state, None, std::slice::from_ref(&filter_expr), None)
7876
.await
@@ -121,7 +119,6 @@ async fn load_table_stats_with_session_level_cache() {
121119

122120
//Session 1 first time list files
123121
assert_eq!(get_static_cache_size(&state1), 0);
124-
#[expect(deprecated)]
125122
let exec1 = table1.scan(&state1, None, &[], None).await.unwrap();
126123

127124
assert_eq!(
@@ -138,7 +135,6 @@ async fn load_table_stats_with_session_level_cache() {
138135
//Session 2 first time list files
139136
//check session 1 cache result not show in session 2
140137
assert_eq!(get_static_cache_size(&state2), 0);
141-
#[expect(deprecated)]
142138
let exec2 = table2.scan(&state2, None, &[], None).await.unwrap();
143139
assert_eq!(
144140
exec2.partition_statistics(None).unwrap().num_rows,
@@ -154,7 +150,6 @@ async fn load_table_stats_with_session_level_cache() {
154150
//Session 1 second time list files
155151
//check session 1 cache result not show in session 2
156152
assert_eq!(get_static_cache_size(&state1), 1);
157-
#[expect(deprecated)]
158153
let exec3 = table1.scan(&state1, None, &[], None).await.unwrap();
159154
assert_eq!(
160155
exec3.partition_statistics(None).unwrap().num_rows,
@@ -200,7 +195,6 @@ async fn list_files_with_session_level_cache() {
200195

201196
//Session 1 first time list files
202197
assert_eq!(get_list_file_cache_size(&state1), 0);
203-
#[expect(deprecated)]
204198
let exec1 = table1.scan(&state1, None, &[], None).await.unwrap();
205199
let data_source_exec = exec1.as_any().downcast_ref::<DataSourceExec>().unwrap();
206200
let data_source = data_source_exec.data_source();
@@ -217,7 +211,6 @@ async fn list_files_with_session_level_cache() {
217211
//Session 2 first time list files
218212
//check session 1 cache result not show in session 2
219213
assert_eq!(get_list_file_cache_size(&state2), 0);
220-
#[expect(deprecated)]
221214
let exec2 = table2.scan(&state2, None, &[], None).await.unwrap();
222215
let data_source_exec = exec2.as_any().downcast_ref::<DataSourceExec>().unwrap();
223216
let data_source = data_source_exec.data_source();
@@ -234,7 +227,6 @@ async fn list_files_with_session_level_cache() {
234227
//Session 1 second time list files
235228
//check session 1 cache result not show in session 2
236229
assert_eq!(get_list_file_cache_size(&state1), 1);
237-
#[expect(deprecated)]
238230
let exec3 = table1.scan(&state1, None, &[], None).await.unwrap();
239231
let data_source_exec = exec3.as_any().downcast_ref::<DataSourceExec>().unwrap();
240232
let data_source = data_source_exec.data_source();

datafusion/core/tests/physical_optimizer/partition_statistics.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ mod test {
102102
.downcast_ref::<ListingTable>()
103103
.unwrap()
104104
.clone();
105-
#[expect(deprecated)]
106105
listing_table
107106
.scan(&ctx.state(), None, &[], None)
108107
.await

datafusion/ffi/src/table_provider.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,6 @@ unsafe extern "C" fn scan_fn_wrapper(
260260

261261
let projections: Vec<_> = projections.into_iter().collect();
262262

263-
#[expect(deprecated)]
264263
let plan = rresult_return!(
265264
internal_provider
266265
.scan(&ctx.state(), Some(&projections), &filters, limit.into())

0 commit comments

Comments
 (0)